From e4f47088af0040d73449d0cb0fe1e6d863f3ad07 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 4 Oct 2014 16:09:02 +0300 Subject: Fixed tests on Windows for issue #21883. --- Lib/ntpath.py | 2 +- Lib/posixpath.py | 2 +- Lib/test/test_genericpath.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 8f5dc55..ee1a215 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -584,7 +584,7 @@ def relpath(path, start=None): if not rel_list: return curdir return join(*rel_list) - except (TypeError, ValueError, AttributeError, BytesWarning): + except (TypeError, ValueError, AttributeError, BytesWarning, DeprecationWarning): genericpath._check_arg_types('relpath', path, start) raise diff --git a/Lib/posixpath.py b/Lib/posixpath.py index ce5f792..44ed838 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -452,6 +452,6 @@ def relpath(path, start=None): if not rel_list: return curdir return join(*rel_list) - except (TypeError, AttributeError, BytesWarning): + except (TypeError, AttributeError, BytesWarning, DeprecationWarning): genericpath._check_arg_types('relpath', path, start) raise diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py index 2e31fe4..f2722bc 100644 --- a/Lib/test/test_genericpath.py +++ b/Lib/test/test_genericpath.py @@ -453,7 +453,8 @@ class CommonTest(GenericTest): def test_relpath_errors(self): # Check relpath() raises friendly TypeErrors. - with support.check_warnings(('', BytesWarning), quiet=True): + with support.check_warnings(('', (BytesWarning, DeprecationWarning)), + quiet=True): errmsg = "Can't mix strings and bytes in path components" with self.assertRaisesRegex(TypeError, errmsg): self.pathmodule.relpath(b'bytes', 'str') -- cgit v0.12 Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/generic/tclStubInit.c
diff options
context:
space:
mode:
authorseandeelywoods <seandeelywoods>2013-03-18 12:41:14 (GMT)
committerseandeelywoods <seandeelywoods>2013-03-18 12:41:14 (GMT)
commit87d0bd2b565cc904bdd135291c1baa5ff5cea4d5 (patch)
tree63b370c68febf9ed24fc630644117cf735313b40 /generic/tclStubInit.c
parent3faa92fe264c5671bd8dad903cb13ca5ce302781 (diff)
parent3fda4f0df6f0fdabe84372aee281ffb4ca7108e1 (diff)
downloadtcl-hypnotoad_bug_3598385.zip
tcl-hypnotoad_bug_3598385.tar.gz
tcl-hypnotoad_bug_3598385.tar.bz2
Merging in changes from trunkhypnotoad_bug_3598385