]> granicus.if.org Git - python/commitdiff
bpo-37412: Fix test_os.test_getcwd_long_path() on macOS (GH-14452)
authorVictor Stinner <vstinner@redhat.com>
Fri, 28 Jun 2019 17:39:48 +0000 (19:39 +0200)
committerGitHub <noreply@github.com>
Fri, 28 Jun 2019 17:39:48 +0000 (19:39 +0200)
Lib/test/test_os.py

index 2e73906f93c3ee3e1cb5a3eeeaaccc69d1688d59..784000a2eb3668ba71f42fab3a2eadf30258c2c3 100644 (file)
@@ -106,8 +106,7 @@ class MiscTests(unittest.TestCase):
         dirname = dirname + ('a' * (dirlen - len(dirname)))
 
         with tempfile.TemporaryDirectory() as tmpdir:
-            with support.change_cwd(tmpdir):
-                path = tmpdir
+            with support.change_cwd(tmpdir) as path:
                 expected = path
 
                 while True: