Issue #26671: Fixed tests for changed error messages.

This commit is contained in:
Serhiy Storchaka 2016-04-08 08:48:20 +03:00
parent 747be0805d
commit 7155b881f2
1 changed files with 3 additions and 3 deletions

View File

@ -411,7 +411,7 @@ class PosixTester(unittest.TestCase):
self.assertTrue(posix.stat(bytearray(os.fsencode(support.TESTFN))))
self.assertRaisesRegex(TypeError,
'can\'t specify None for path argument',
'should be string, bytes or integer, not',
posix.stat, None)
self.assertRaisesRegex(TypeError,
'should be string, bytes or integer, not',
@ -863,9 +863,9 @@ class PosixTester(unittest.TestCase):
self.assertEqual(s1, s2)
s2 = posix.stat(support.TESTFN, dir_fd=None)
self.assertEqual(s1, s2)
self.assertRaisesRegex(TypeError, 'should be integer, not',
self.assertRaisesRegex(TypeError, 'should be integer or None, not',
posix.stat, support.TESTFN, dir_fd=posix.getcwd())
self.assertRaisesRegex(TypeError, 'should be integer, not',
self.assertRaisesRegex(TypeError, 'should be integer or None, not',
posix.stat, support.TESTFN, dir_fd=float(f))
self.assertRaises(OverflowError,
posix.stat, support.TESTFN, dir_fd=10**20)