diff Lib/test/test_datetime.py @ 40771:e776c83a0c19 legacy-trunk

Bug #1653736: Complain about keyword arguments to time.isoformat. Will backport to 2.5.
author Martin v. Löwis <martin@v.loewis.de>
date Thu, 08 Feb 2007 09:13:36 +0000
parents b7ae8977d06e
children 35ae28257a28 3cfdb80bc68e
line wrap: on
line diff
--- a/Lib/test/test_datetime.py	Thu Feb 08 01:42:35 2007 +0000
+++ b/Lib/test/test_datetime.py	Thu Feb 08 09:13:36 2007 +0000
@@ -1740,6 +1740,11 @@
         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")