##// END OF EJS Templates
Reset sys.path after test
Wei Yen -
Show More
@@ -170,6 +170,9 b' def test_module_without_init():'
170 fake_module_name = "foo"
170 fake_module_name = "foo"
171 with TemporaryDirectory() as tmpdir:
171 with TemporaryDirectory() as tmpdir:
172 sys.path.insert(0, tmpdir)
172 sys.path.insert(0, tmpdir)
173 os.makedirs(os.path.join(tmpdir, fake_module_name))
173 try:
174 s = try_import(mod=fake_module_name)
174 os.makedirs(os.path.join(tmpdir, fake_module_name))
175 assert s == []
175 s = try_import(mod=fake_module_name)
176 assert s == []
177 finally:
178 sys.path.remove(tmpdir)
General Comments 0
You need to be logged in to leave comments. Login now