atomictempfile: remove test ordering
authorMartijn Pieters <mjpieters@fb.com>
Thu, 23 Jun 2016 18:18:33 +0100
changeset 29392 f21286e48bc6
parent 29391 1acf654f0985
child 29393 50269a4dce61
atomictempfile: remove test ordering These tests are independent and numbering only makes it harder to add more and logically group them.
tests/test-atomictempfile.py
--- a/tests/test-atomictempfile.py	Thu Jun 23 17:35:43 2016 +0100
+++ b/tests/test-atomictempfile.py	Thu Jun 23 18:18:33 2016 +0100
@@ -19,7 +19,7 @@
     def tearDown(self):
         shutil.rmtree(self._testdir, True)
 
-    def test1_simple(self):
+    def testsimple(self):
         file = atomictempfile(self._filename)
         self.assertFalse(os.path.isfile(self._filename))
         tempfilename = file._tempname
@@ -34,7 +34,7 @@
             os.path.join(self._testdir, '.testfilename-*')))
 
     # discard() removes the temp file without making the write permanent
-    def test2_discard(self):
+    def testdiscard(self):
         file = atomictempfile(self._filename)
         (dir, basename) = os.path.split(file._tempname)
 
@@ -46,11 +46,11 @@
 
     # if a programmer screws up and passes bad args to atomictempfile, they
     # get a plain ordinary TypeError, not infinite recursion
-    def test3_oops(self):
+    def testoops(self):
         self.assertRaises(TypeError, atomictempfile)
 
     # checkambig=True avoids ambiguity of timestamp
-    def test4_checkambig(self):
+    def testcheckambig(self):
         def atomicwrite(checkambig):
             f = atomictempfile(self._filename, checkambig=checkambig)
             f.write('FOO')