Bug #1653736: Complain about keyword arguments to time.isoformat.

Will backport to 2.5.
This commit is contained in:
Martin v. Löwis 2007-02-08 09:13:36 +00:00
parent 495df4716f
commit 4c11a92625
3 changed files with 9 additions and 2 deletions

View file

@ -1740,6 +1740,11 @@ def test_isoformat(self):
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")