diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_ntpath.py | 3 | ||||
-rw-r--r-- | Lib/test/test_optparse.py | 6 | ||||
-rw-r--r-- | Lib/test/test_tcl.py | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py index 4a7a48b19c..8ff7075ae5 100644 --- a/Lib/test/test_ntpath.py +++ b/Lib/test/test_ntpath.py @@ -174,6 +174,9 @@ class TestNtpath(unittest.TestCase): tester("ntpath.normpath('C:////a/b')", r'C:\a\b') tester("ntpath.normpath('//machine/share//a/b')", r'\\machine\share\a\b') + tester("ntpath.normpath('\\\\.\\NUL')", r'\\.\NUL') + tester("ntpath.normpath('\\\\?\\D:/XY\\Z')", r'\\?\D:/XY\Z') + def test_expandvars(self): with support.EnvironmentVarGuard() as env: env.clear() diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py index 79467b0512..b68e31d00d 100644 --- a/Lib/test/test_optparse.py +++ b/Lib/test/test_optparse.py @@ -783,15 +783,13 @@ class TestBool(BaseTest): (options, args) = self.assertParseOK(["-q"], {'verbose': 0}, []) - if hasattr(__builtins__, 'False'): - self.assertTrue(options.verbose is False) + self.assertTrue(options.verbose is False) def test_bool_true(self): (options, args) = self.assertParseOK(["-v"], {'verbose': 1}, []) - if hasattr(__builtins__, 'True'): - self.assertTrue(options.verbose is True) + self.assertTrue(options.verbose is True) def test_bool_flicker_on_and_off(self): self.assertParseOK(["-qvq", "-q", "-v"], diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index a269db831a..542986c06e 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -143,7 +143,7 @@ class TclTest(unittest.TestCase): fullname[0], fullname[3:]) - with test_support.EnvironmentVarGuard() as env: + with support.EnvironmentVarGuard() as env: env.unset("TCL_LIBRARY") f = os.popen('%s -c "import Tkinter; print Tkinter"' % (unc_name,)) |