summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_glob.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2015-09-07 12:16:38 (GMT)
committerLarry Hastings <larry@hastings.org>2015-09-07 12:16:38 (GMT)
commitc8c47f55e636ed86791160944ccbb1ea651476bd (patch)
treedb97b6edb082a98c6ad2abcbacb6151ee2df2049 /Lib/test/test_glob.py
parent71f9633818b3a0cbd36b0f6ed164d436b1997fe9 (diff)
parent8c85a2083fdc6188d32f1eb287151cdb7e79a54a (diff)
downloadcpython-c8c47f55e636ed86791160944ccbb1ea651476bd.zip
cpython-c8c47f55e636ed86791160944ccbb1ea651476bd.tar.gz
cpython-c8c47f55e636ed86791160944ccbb1ea651476bd.tar.bz2
Merge heads.
Diffstat (limited to 'Lib/test/test_glob.py')
-rw-r--r--Lib/test/test_glob.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/test/test_glob.py b/Lib/test/test_glob.py
index 21b0153..926588e 100644
--- a/Lib/test/test_glob.py
+++ b/Lib/test/test_glob.py
@@ -242,9 +242,7 @@ class GlobTests(unittest.TestCase):
('a', 'bcd', 'EF'), ('a', 'bcd', 'efg')))
eq(self.rglob('a', '**', 'bcd'), self.joins(('a', 'bcd')))
- predir = os.path.abspath(os.curdir)
- try:
- os.chdir(self.tempdir)
+ with change_cwd(self.tempdir):
join = os.path.join
eq(glob.glob('**', recursive=True), [join(*i) for i in full])
eq(glob.glob(join('**', ''), recursive=True),
@@ -256,8 +254,6 @@ class GlobTests(unittest.TestCase):
if can_symlink():
expect += [join('sym3', 'EF')]
eq(glob.glob(join('**', 'EF'), recursive=True), expect)
- finally:
- os.chdir(predir)
@skip_unless_symlink