summaryrefslogtreecommitdiff
path: root/Lib/test/test_strptime.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_strptime.py')
-rw-r--r--Lib/test/test_strptime.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py
index a106a4289d..2c3955b4a3 100644
--- a/Lib/test/test_strptime.py
+++ b/Lib/test/test_strptime.py
@@ -227,6 +227,10 @@ class StrptimeTests(unittest.TestCase):
self.assertRaises(ValueError, _strptime.strptime, data_string="%d",
format="%A")
+ def test_unconverteddata(self):
+ # Check ValueError is raised when there is unconverted data
+ self.assertRaises(ValueError, _strptime.strptime, "10 12", "%m")
+
def helper(self, directive, position):
"""Helper fxn in testing."""
strf_output = time.strftime("%" + directive, self.time_tuple)