Kaydet (Commit) fabc3083 authored tarafından Tarek Ziade's avatar Tarek Ziade

fixed the cwd cleanup in packaging test_util

üst eb64b61b
......@@ -526,11 +526,18 @@ class GlobTestCaseBase(support.TempdirManager,
class GlobTestCase(GlobTestCaseBase):
def setUp(self):
super(GlobTestCase, self).setUp()
self.cwd = os.getcwd()
def tearDown(self):
os.chdir(self.cwd)
super(GlobTestCase, self).tearDown()
def assertGlobMatch(self, glob, spec):
""""""
tempdir = self.build_files_tree(spec)
expected = self.clean_tree(spec)
self.addCleanup(os.chdir, os.getcwd())
os.chdir(tempdir)
result = list(iglob(glob))
self.assertCountEqual(expected, result)
......
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