There was an error while loading. Please reload this page.
1 parent 354eeff commit 22f5e3eCopy full SHA for 22f5e3e
1 file changed
tests/test_saneyaml.py
@@ -137,6 +137,19 @@ def test_load_ignore_aliases(self):
137
])
138
assert expected == result
139
140
+ def test_is_iso_date(self):
141
+ assert saneyaml.is_iso_date('1994-01-01')
142
+ assert saneyaml.is_iso_date('2004-01-01')
143
+ assert not saneyaml.is_iso_date('1800-01-01')
144
+ assert not saneyaml.is_iso_date('2100-01-01')
145
+ assert saneyaml.is_iso_date('2004-01-30')
146
+ assert not saneyaml.is_iso_date('2004-01-40')
147
+ assert not saneyaml.is_iso_date('2004-01-4')
148
+ assert not saneyaml.is_iso_date('2004-01-3a')
149
+ assert not saneyaml.is_iso_date('1994-01-1')
150
+ assert not saneyaml.is_iso_date('1994-1-1')
151
+ assert not saneyaml.is_iso_date('193')
152
+
153
154
safe_chars = re.compile(r'[\W_]', re.MULTILINE)
155
0 commit comments