Kaydet (Commit) bb2c45e7 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Issue #7732: try to fix test_bug7732's flakiness on Windows by executing it in a…

Issue #7732: try to fix test_bug7732's flakiness on Windows by executing it in a fresh temporary directory.
üst 228c1945
......@@ -278,13 +278,11 @@ class ImportTests(unittest.TestCase):
@unittest.skipIf(sys.dont_write_bytecode,
"test meaningful only when writing bytecode")
def test_bug7732(self):
source = support.TESTFN + '.py'
os.mkdir(source)
try:
with support.temp_cwd():
source = support.TESTFN + '.py'
os.mkdir(source)
self.assertRaisesRegex(ImportError, '^No module',
imp.find_module, support.TESTFN, ["."])
finally:
os.rmdir(source)
class ReloadTests(unittest.TestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment