]> granicus.if.org Git - python/commitdiff
#15304: fix wrong warning message in test.support.temp_cwd().
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 21 Sep 2012 13:48:12 +0000 (16:48 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 21 Sep 2012 13:48:12 +0000 (16:48 +0300)
Lib/test/support.py
Misc/NEWS

index d88562e907dbe07ae9053fcb57b6a983c09b2aa4..e1ec9e2d1f7084beca003a177013fee6496cf27c 100644 (file)
@@ -600,7 +600,7 @@ def temp_cwd(name='tempcwd', quiet=False, path=None):
     except OSError:
         if not quiet:
             raise
-        warnings.warn('tests may fail, unable to change the CWD to ' + name,
+        warnings.warn('tests may fail, unable to change the CWD to ' + path,
                       RuntimeWarning, stacklevel=3)
     try:
         yield os.getcwd()
index c7e18277fbd80d3334421da082f07190656e231d..bebab93611dc425fdae7c524b2af70fc82776ffb 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -494,6 +494,9 @@ Extension Modules
 Tests
 -----
 
+- Issue #15304: Fix warning message when os.chdir() fails inside
+  test.support.temp_cwd().  Patch by Chris Jerdonek.
+
 - Issue #15802: Fix test logic in TestMaildir.test_create_tmp. Patch
   by Serhiy Storchaka.