[Python-checkins] cpython: Issue #26671: Fixed tests for changed error messages.

serhiy.storchaka python-checkins at python.org
Fri Apr 8 01:48:47 EDT 2016


https://hg.python.org/cpython/rev/633bb190fb76
changeset:   100869:633bb190fb76
parent:      100867:ea598d69b7d3
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Fri Apr 08 08:48:20 2016 +0300
summary:
  Issue #26671: Fixed tests for changed error messages.

files:
  Lib/test/test_posix.py |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -411,7 +411,7 @@
         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 @@
             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)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list