We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4c468d commit a29a5a4Copy full SHA for a29a5a4
1 file changed
tests/test_converters/test_calendars/test_gregorian/test_gregorian_converter.py
@@ -1,3 +1,6 @@
1
+import pytest
2
+
3
4
from undate.date import DatePrecision
5
from undate.undate import Undate, Calendar
6
from undate.converters.calendars import GregorianDateConverter
@@ -65,3 +68,10 @@ def test_parse(self):
65
68
assert date.calendar == Calendar.GREGORIAN
66
69
assert date.precision == DatePrecision.YEAR
67
70
assert date.label == date_str
71
72
+ def test_parse_errors(self):
73
+ with pytest.raises(ValueError, match="empty string is not supported"):
74
+ GregorianDateConverter().parse("")
75
76
+ with pytest.raises(ValueError, match="Could not parse"):
77
+ GregorianDateConverter().parse("Foo 1920")
0 commit comments