]> granicus.if.org Git - python/commitdiff
Issue #6074: Actually delete the source file in the test as intended
authorNick Coghlan <ncoghlan@gmail.com>
Fri, 19 Oct 2012 13:17:48 +0000 (23:17 +1000)
committerNick Coghlan <ncoghlan@gmail.com>
Fri, 19 Oct 2012 13:17:48 +0000 (23:17 +1000)
Lib/test/test_import.py

index c72bca041babc17b52e47a4615a842f463ce1ad2..f209d1b5b5ae81fab4f21eb7fbb0fa87e1ffaa84 100644 (file)
@@ -156,7 +156,7 @@ class ImportTests(unittest.TestCase):
             m2 = __import__(TESTFN)
             self.assertEqual(m2.x, 'rewritten')
             # Now delete the source file and check the pyc was rewritten
-            unlink(TESTFN)
+            unlink(fname)
             unload(TESTFN)
             m3 = __import__(TESTFN)
             self.assertEqual(m3.x, 'rewritten')