diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-02-08 07:25:53 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-02-08 07:25:53 (GMT) |
commit | 0c0d537b24f66cf16c76ce8f13c21de2ebdbdf44 (patch) | |
tree | 768c12ebb36bddd866096522f513ddcff757475b /Lib/test/datetimetester.py | |
parent | c4b813d05dbf8b1bc1ab3c27198b397152deb4a3 (diff) | |
download | cpython-0c0d537b24f66cf16c76ce8f13c21de2ebdbdf44.zip cpython-0c0d537b24f66cf16c76ce8f13c21de2ebdbdf44.tar.gz cpython-0c0d537b24f66cf16c76ce8f13c21de2ebdbdf44.tar.bz2 |
Issue #26198: Make datetime error tests more lenient.
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r-- | Lib/test/datetimetester.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index 6365c60..63bfed5 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -1239,7 +1239,7 @@ class TestDate(HarmlessMixedComparison, unittest.TestCase): dt = self.theclass(2007, 9, 10) self.assertEqual(dt.__format__(''), str(dt)) - with self.assertRaisesRegex(TypeError, '^must be str, not int$'): + with self.assertRaisesRegex(TypeError, 'must be str, not int'): dt.__format__(123) # check that a derived class's __str__() gets called @@ -1574,7 +1574,7 @@ class TestDateTime(TestDate): dt = self.theclass(2007, 9, 10, 4, 5, 1, 123) self.assertEqual(dt.__format__(''), str(dt)) - with self.assertRaisesRegex(TypeError, '^must be str, not int$'): + with self.assertRaisesRegex(TypeError, 'must be str, not int'): dt.__format__(123) # check that a derived class's __str__() gets called @@ -2336,7 +2336,7 @@ class TestTime(HarmlessMixedComparison, unittest.TestCase): t = self.theclass(1, 2, 3, 4) self.assertEqual(t.__format__(''), str(t)) - with self.assertRaisesRegex(TypeError, '^must be str, not int$'): + with self.assertRaisesRegex(TypeError, 'must be str, not int'): t.__format__(123) # check that a derived class's __str__() gets called |