Fixed tests on Windows for issue #21883.

This commit is contained in:
Serhiy Storchaka 2014-10-04 16:09:02 +03:00
parent d32abc12e8
commit e4f47088af
3 changed files with 4 additions and 3 deletions

View file

@ -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')