]> granicus.if.org Git - python/commitdiff
bpo-37412: Fix test_os.test_getcwd_long_path() on macOS (GH-14452)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 28 Jun 2019 18:07:10 +0000 (11:07 -0700)
committerGitHub <noreply@github.com>
Fri, 28 Jun 2019 18:07:10 +0000 (11:07 -0700)
(cherry picked from commit 29f609ed07aa7856741ff8b8b8b050369d0faf81)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
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: