summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_datetime.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-01-19 15:06:00 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-01-19 15:06:00 (GMT)
commitf5def21ce7c826deae66bdc7ebb3b3e5ea8dd09d (patch)
tree1430cfb4c20ac9054b72ed2f106d190244265038 /Lib/test/test_datetime.py
parent945fdd6e6d0e27e1a39da748c12816a9b7a3785c (diff)
downloadcpython-f5def21ce7c826deae66bdc7ebb3b3e5ea8dd09d.zip
cpython-f5def21ce7c826deae66bdc7ebb3b3e5ea8dd09d.tar.gz
cpython-f5def21ce7c826deae66bdc7ebb3b3e5ea8dd09d.tar.bz2
Merged revisions 68610,68621-68622,68649 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r68610 | kristjan.jonsson | 2009-01-15 03:09:13 -0600 (Thu, 15 Jan 2009) | 3 lines 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. ........ r68621 | kristjan.jonsson | 2009-01-15 16:40:03 -0600 (Thu, 15 Jan 2009) | 1 line Fix two test cases in test_os. ftruncate raises IOError unlike all the others which raise OSError. And close() on some platforms doesn't complain when given an invalid file descriptor. ........ r68622 | kristjan.jonsson | 2009-01-15 16:46:26 -0600 (Thu, 15 Jan 2009) | 1 line Make all the invalid fd tests for os subject to the function being available. ........ r68649 | benjamin.peterson | 2009-01-16 22:39:05 -0600 (Fri, 16 Jan 2009) | 1 line trying to find some fpathconf() settings that all unixs support... ........
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")