[Python-checkins] bpo-37412: Fix test_os.test_getcwd_long_path() on macOS (GH-14452)

Victor Stinner webhook-mailer at python.org
Fri Jun 28 13:39:52 EDT 2019


https://github.com/python/cpython/commit/29f609ed07aa7856741ff8b8b8b050369d0faf81
commit: 29f609ed07aa7856741ff8b8b8b050369d0faf81
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2019-06-28T19:39:48+02:00
summary:

bpo-37412: Fix test_os.test_getcwd_long_path() on macOS (GH-14452)

files:
M Lib/test/test_os.py

diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 2e73906f93c3..784000a2eb36 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -106,8 +106,7 @@ def test_getcwd_long_path(self):
         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:



More information about the Python-checkins mailing list