diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-02-08 09:13:36 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-02-08 09:13:36 (GMT) |
commit | 4c11a926255ba5c798b52ce9529a37b9bae99132 (patch) | |
tree | 1608d3d5c1d0e460a93279758590814b7c63a6dc /Lib/test/test_datetime.py | |
parent | 495df4716fce4156c1eb110f9342297164eecbb6 (diff) | |
download | cpython-4c11a926255ba5c798b52ce9529a37b9bae99132.zip cpython-4c11a926255ba5c798b52ce9529a37b9bae99132.tar.gz cpython-4c11a926255ba5c798b52ce9529a37b9bae99132.tar.bz2 |
Bug #1653736: Complain about keyword arguments to time.isoformat.
Will backport to 2.5.
Diffstat (limited to 'Lib/test/test_datetime.py')
-rw-r--r-- | Lib/test/test_datetime.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_datetime.py b/Lib/test/test_datetime.py index 436cfca..3aa0468 100644 --- a/Lib/test/test_datetime.py +++ b/Lib/test/test_datetime.py @@ -1740,6 +1740,11 @@ class TestTime(HarmlessMixedComparison): self.assertEqual(t.isoformat(), "00:00:00.100000") self.assertEqual(t.isoformat(), str(t)) + def test_1653736(self): + # verify it doesn't accept extra keyword arguments + t = self.theclass(second=1) + self.assertRaises(TypeError, t.isoformat, foo=3) + def test_strftime(self): t = self.theclass(1, 2, 3, 4) self.assertEqual(t.strftime('%H %M %S'), "01 02 03") |