changeset: 92807:85de13b746ac parent: 92800:fc941169125e user: Serhiy Storchaka date: Sat Oct 04 16:09:02 2014 +0300 files: Lib/ntpath.py Lib/posixpath.py Lib/test/test_genericpath.py description: Fixed tests on Windows for issue #21883. diff -r fc941169125e -r 85de13b746ac Lib/ntpath.py --- a/Lib/ntpath.py Sat Oct 04 15:05:22 2014 +0300 +++ b/Lib/ntpath.py Sat Oct 04 16:09:02 2014 +0300 @@ -584,7 +584,7 @@ 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 -r fc941169125e -r 85de13b746ac Lib/posixpath.py --- a/Lib/posixpath.py Sat Oct 04 15:05:22 2014 +0300 +++ b/Lib/posixpath.py Sat Oct 04 16:09:02 2014 +0300 @@ -452,6 +452,6 @@ 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 -r fc941169125e -r 85de13b746ac Lib/test/test_genericpath.py --- a/Lib/test/test_genericpath.py Sat Oct 04 15:05:22 2014 +0300 +++ b/Lib/test/test_genericpath.py Sat Oct 04 16:09:02 2014 +0300 @@ -453,7 +453,8 @@ 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')