@@ -87,6 +87,24 @@ def narrow_unicode_build(test): # pragma: no cover
87
87
return
88
88
89
89
90
+ if sys .version_info < (3 , 7 ):
91
+ message = "datetime.date.fromisoformat is new in 3.7+"
92
+
93
+ def missing_date_fromisoformat (test ):
94
+ return skip (
95
+ message = message ,
96
+ subject = "date" ,
97
+ description = "invalidates non-padded month dates" ,
98
+ )(test ) or skip (
99
+ message = message ,
100
+ subject = "date" ,
101
+ description = "invalidates non-padded day dates" ,
102
+ )(test )
103
+ else :
104
+ def missing_date_fromisoformat (test ):
105
+ return
106
+
107
+
90
108
TestDraft3 = DRAFT3 .to_unittest_testcase (
91
109
DRAFT3 .tests (),
92
110
DRAFT3 .format_tests (),
@@ -97,18 +115,9 @@ def narrow_unicode_build(test): # pragma: no cover
97
115
format_checker = draft3_format_checker ,
98
116
skip = lambda test : (
99
117
narrow_unicode_build (test )
118
+ or missing_date_fromisoformat (test )
100
119
or missing_format (draft3_format_checker )(test )
101
120
or complex_email_validation (test )
102
- or skip (
103
- message = bug (685 ),
104
- subject = "date" ,
105
- description = "invalidates non-padded month dates" ,
106
- )(test )
107
- or skip (
108
- message = bug (685 ),
109
- subject = "date" ,
110
- description = "invalidates non-padded day dates" ,
111
- )(test )
112
121
or skip (
113
122
message = "Upstream bug in strict_rfc3339" ,
114
123
subject = "date-time" ,
@@ -158,6 +167,7 @@ def narrow_unicode_build(test): # pragma: no cover
158
167
format_checker = draft4_format_checker ,
159
168
skip = lambda test : (
160
169
narrow_unicode_build (test )
170
+ or missing_date_fromisoformat (test )
161
171
or missing_format (draft4_format_checker )(test )
162
172
or complex_email_validation (test )
163
173
or skip (
@@ -237,6 +247,7 @@ def narrow_unicode_build(test): # pragma: no cover
237
247
format_checker = draft6_format_checker ,
238
248
skip = lambda test : (
239
249
narrow_unicode_build (test )
250
+ or missing_date_fromisoformat (test )
240
251
or missing_format (draft6_format_checker )(test )
241
252
or complex_email_validation (test )
242
253
or skip (
@@ -337,6 +348,7 @@ def narrow_unicode_build(test): # pragma: no cover
337
348
format_checker = draft7_format_checker ,
338
349
skip = lambda test : (
339
350
narrow_unicode_build (test )
351
+ or missing_date_fromisoformat (test )
340
352
or missing_format (draft7_format_checker )(test )
341
353
or complex_email_validation (test )
342
354
or skip (
@@ -368,16 +380,6 @@ def narrow_unicode_build(test): # pragma: no cover
368
380
subject = "refRemote" ,
369
381
case_description = "base URI change - change folder in subschema" ,
370
382
)(test )
371
- or skip (
372
- message = bug (685 ),
373
- subject = "date" ,
374
- description = "invalidates non-padded month dates" ,
375
- )(test )
376
- or skip (
377
- message = bug (685 ),
378
- subject = "date" ,
379
- description = "invalidates non-padded day dates" ,
380
- )(test )
381
383
or skip (
382
384
message = "Upstream bug in strict_rfc3339" ,
383
385
subject = "date-time" ,
0 commit comments