Add tests for invalid format specifiers in strftime, and for handling of invalid file descriptors in the os module.
diff --git a/Lib/test/test_datetime.py b/Lib/test/test_datetime.py
index ff00d8b..89fa5c8 100644
--- a/Lib/test/test_datetime.py
+++ b/Lib/test/test_datetime.py
@@ -856,6 +856,14 @@
# A naive object replaces %z and %Z w/ empty strings.
self.assertEqual(t.strftime("'%z' '%Z'"), "'' ''")
+ #make sure that invalid format specifiers are handled correctly
+ self.assertRaises(ValueError, t.strftime, "%e")
+ self.assertRaises(ValueError, t.strftime, "%")
+ self.assertRaises(ValueError, t.strftime, "%#")
+
+ #check that this standard extension works
+ t.strftime("%f")
+
def test_format(self):
dt = self.theclass(2007, 9, 10)