equal
deleted
inserted
replaced
45 self.assertTrue(basename not in os.listdir('.')) |
45 self.assertTrue(basename not in os.listdir('.')) |
46 |
46 |
47 # if a programmer screws up and passes bad args to atomictempfile, they |
47 # if a programmer screws up and passes bad args to atomictempfile, they |
48 # get a plain ordinary TypeError, not infinite recursion |
48 # get a plain ordinary TypeError, not infinite recursion |
49 def testoops(self): |
49 def testoops(self): |
50 self.assertRaises(TypeError, atomictempfile) |
50 with self.assertRaises(TypeError): |
|
51 atomictempfile() |
51 |
52 |
52 # checkambig=True avoids ambiguity of timestamp |
53 # checkambig=True avoids ambiguity of timestamp |
53 def testcheckambig(self): |
54 def testcheckambig(self): |
54 def atomicwrite(checkambig): |
55 def atomicwrite(checkambig): |
55 f = atomictempfile(self._filename, checkambig=checkambig) |
56 f = atomictempfile(self._filename, checkambig=checkambig) |