[Python-checkins] r71996 - in python/branches/py3k/Lib/test: test_optparse.py test_posixpath.py test_tempfile.py

hirokazu.yamamoto python-checkins at python.org
Mon Apr 27 03:44:28 CEST 2009


Author: hirokazu.yamamoto
Date: Mon Apr 27 03:44:28 2009
New Revision: 71996

Log:
test_support was renamed to support on py3k.

Modified:
   python/branches/py3k/Lib/test/test_optparse.py
   python/branches/py3k/Lib/test/test_posixpath.py
   python/branches/py3k/Lib/test/test_tempfile.py

Modified: python/branches/py3k/Lib/test/test_optparse.py
==============================================================================
--- python/branches/py3k/Lib/test/test_optparse.py	(original)
+++ python/branches/py3k/Lib/test/test_optparse.py	Mon Apr 27 03:44:28 2009
@@ -1448,7 +1448,7 @@
         # we must restore its original value -- otherwise, this test
         # screws things up for other tests when it's part of the Python
         # test suite.
-        with test_support.EnvironmentVarGuard() as env:
+        with support.EnvironmentVarGuard() as env:
             env.set('COLUMNS', str(columns))
             return InterceptingOptionParser(option_list=options)
 
@@ -1473,7 +1473,7 @@
         self.assertHelpEquals(_expected_help_long_opts_first)
 
     def test_help_title_formatter(self):
-        with test_support.EnvironmentVarGuard() as env:
+        with support.EnvironmentVarGuard() as env:
             env.set("COLUMNS", "80")
             self.parser.formatter = TitledHelpFormatter()
             self.assertHelpEquals(_expected_help_title_formatter)

Modified: python/branches/py3k/Lib/test/test_posixpath.py
==============================================================================
--- python/branches/py3k/Lib/test/test_posixpath.py	(original)
+++ python/branches/py3k/Lib/test/test_posixpath.py	Mon Apr 27 03:44:28 2009
@@ -419,7 +419,7 @@
             self.assert_(isinstance(posixpath.expanduser(b"~root/"), bytes))
             self.assert_(isinstance(posixpath.expanduser(b"~foo/"), bytes))
 
-            with test_support.EnvironmentVarGuard() as env:
+            with support.EnvironmentVarGuard() as env:
                 env.set('HOME', '/')
                 self.assertEqual(posixpath.expanduser("~"), "/")
 

Modified: python/branches/py3k/Lib/test/test_tempfile.py
==============================================================================
--- python/branches/py3k/Lib/test/test_tempfile.py	(original)
+++ python/branches/py3k/Lib/test/test_tempfile.py	Mon Apr 27 03:44:28 2009
@@ -149,7 +149,7 @@
         # _candidate_tempdir_list contains the expected directories
 
         # Make sure the interesting environment variables are all set.
-        with test_support.EnvironmentVarGuard() as env:
+        with support.EnvironmentVarGuard() as env:
             for envname in 'TMPDIR', 'TEMP', 'TMP':
                 dirname = os.getenv(envname)
                 if not dirname:


More information about the Python-checkins mailing list