mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
test_support was renamed to support on py3k.
This commit is contained in:
parent
5afb5c6630
commit
7195963aa2
3 changed files with 4 additions and 4 deletions
|
@ -1448,7 +1448,7 @@ class TestHelp(BaseTest):
|
||||||
# we must restore its original value -- otherwise, this test
|
# we must restore its original value -- otherwise, this test
|
||||||
# screws things up for other tests when it's part of the Python
|
# screws things up for other tests when it's part of the Python
|
||||||
# test suite.
|
# test suite.
|
||||||
with test_support.EnvironmentVarGuard() as env:
|
with support.EnvironmentVarGuard() as env:
|
||||||
env.set('COLUMNS', str(columns))
|
env.set('COLUMNS', str(columns))
|
||||||
return InterceptingOptionParser(option_list=options)
|
return InterceptingOptionParser(option_list=options)
|
||||||
|
|
||||||
|
@ -1473,7 +1473,7 @@ class TestHelp(BaseTest):
|
||||||
self.assertHelpEquals(_expected_help_long_opts_first)
|
self.assertHelpEquals(_expected_help_long_opts_first)
|
||||||
|
|
||||||
def test_help_title_formatter(self):
|
def test_help_title_formatter(self):
|
||||||
with test_support.EnvironmentVarGuard() as env:
|
with support.EnvironmentVarGuard() as env:
|
||||||
env.set("COLUMNS", "80")
|
env.set("COLUMNS", "80")
|
||||||
self.parser.formatter = TitledHelpFormatter()
|
self.parser.formatter = TitledHelpFormatter()
|
||||||
self.assertHelpEquals(_expected_help_title_formatter)
|
self.assertHelpEquals(_expected_help_title_formatter)
|
||||||
|
|
|
@ -419,7 +419,7 @@ class PosixPathTest(unittest.TestCase):
|
||||||
self.assert_(isinstance(posixpath.expanduser(b"~root/"), bytes))
|
self.assert_(isinstance(posixpath.expanduser(b"~root/"), bytes))
|
||||||
self.assert_(isinstance(posixpath.expanduser(b"~foo/"), bytes))
|
self.assert_(isinstance(posixpath.expanduser(b"~foo/"), bytes))
|
||||||
|
|
||||||
with test_support.EnvironmentVarGuard() as env:
|
with support.EnvironmentVarGuard() as env:
|
||||||
env.set('HOME', '/')
|
env.set('HOME', '/')
|
||||||
self.assertEqual(posixpath.expanduser("~"), "/")
|
self.assertEqual(posixpath.expanduser("~"), "/")
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ class test__candidate_tempdir_list(TC):
|
||||||
# _candidate_tempdir_list contains the expected directories
|
# _candidate_tempdir_list contains the expected directories
|
||||||
|
|
||||||
# Make sure the interesting environment variables are all set.
|
# 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':
|
for envname in 'TMPDIR', 'TEMP', 'TMP':
|
||||||
dirname = os.getenv(envname)
|
dirname = os.getenv(envname)
|
||||||
if not dirname:
|
if not dirname:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue