summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_datetime.py
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2009-01-15 09:09:13 (GMT)
committerKristján Valur Jónsson <kristjan@ccpgames.com>2009-01-15 09:09:13 (GMT)
commit8adc0b54d4f995ff739967fdc70d6a6e53ac1f90 (patch)
tree7ccbe991f00ef50341d32c870cf830847a52336b /Lib/test/test_datetime.py
parent018760e3dc7c7f30cc4d232140cc62bd8b10b1fb (diff)
downloadcpython-8adc0b54d4f995ff739967fdc70d6a6e53ac1f90.zip
cpython-8adc0b54d4f995ff739967fdc70d6a6e53ac1f90.tar.gz
cpython-8adc0b54d4f995ff739967fdc70d6a6e53ac1f90.tar.bz2
Fix recently introduced test cases.
For datetime, gentoo didn't seem to mind the %e format for strftime. So, we just excercise those instead making sure that we don't crash. For test_os, two cases were incorrect.
Diffstat (limited to 'Lib/test/test_datetime.py')
-rw-r--r--Lib/test/test_datetime.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/Lib/test/test_datetime.py b/Lib/test/test_datetime.py
index 89fa5c8..24ec895 100644
--- a/Lib/test/test_datetime.py
+++ b/Lib/test/test_datetime.py
@@ -857,9 +857,18 @@ class TestDate(HarmlessMixedComparison, unittest.TestCase):
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, "%#")
+ #self.assertRaises(ValueError, t.strftime, "%e")
+ #self.assertRaises(ValueError, t.strftime, "%")
+ #self.assertRaises(ValueError, t.strftime, "%#")
+
+ #oh well, some systems just ignore those invalid ones.
+ #at least, excercise them to make sure that no crashes
+ #are generated
+ for f in ["%e", "%", "%#"]:
+ try:
+ t.strftime(f)
+ except ValueError:
+ pass
#check that this standard extension works
t.strftime("%f")