@@ -87,6 +87,25 @@ def narrow_unicode_build(test): # pragma: no cover
87
87
return
88
88
89
89
90
+ if sys .version_info < (3 , 7 ):
91
+ message = "Not running tests which require Python 3.7 or greater"
92
+
93
+ def python_lt_37_build (test ):
94
+ return skip (
95
+ message = bug (685 ),
96
+ subject = "date" ,
97
+ description = "invalidates non-padded month dates" ,
98
+ )(test )
99
+ or skip (
100
+ message = bug (685 ),
101
+ subject = "date" ,
102
+ description = "invalidates non-padded day dates" ,
103
+ )(test )
104
+ else :
105
+ def python_lt_37_build (test ):
106
+ return
107
+
108
+
90
109
TestDraft3 = DRAFT3 .to_unittest_testcase (
91
110
DRAFT3 .tests (),
92
111
DRAFT3 .format_tests (),
@@ -97,6 +116,7 @@ def narrow_unicode_build(test): # pragma: no cover
97
116
format_checker = draft3_format_checker ,
98
117
skip = lambda test : (
99
118
narrow_unicode_build (test )
119
+ or python_lt_37_build (test )
100
120
or missing_format (draft3_format_checker )(test )
101
121
or complex_email_validation (test )
102
122
or skip (
@@ -148,6 +168,7 @@ def narrow_unicode_build(test): # pragma: no cover
148
168
format_checker = draft4_format_checker ,
149
169
skip = lambda test : (
150
170
narrow_unicode_build (test )
171
+ or python_lt_37_build (test )
151
172
or missing_format (draft4_format_checker )(test )
152
173
or complex_email_validation (test )
153
174
or skip (
@@ -227,6 +248,7 @@ def narrow_unicode_build(test): # pragma: no cover
227
248
format_checker = draft6_format_checker ,
228
249
skip = lambda test : (
229
250
narrow_unicode_build (test )
251
+ or python_lt_37_build (test )
230
252
or missing_format (draft6_format_checker )(test )
231
253
or complex_email_validation (test )
232
254
or skip (
@@ -327,6 +349,7 @@ def narrow_unicode_build(test): # pragma: no cover
327
349
format_checker = draft7_format_checker ,
328
350
skip = lambda test : (
329
351
narrow_unicode_build (test )
352
+ or python_lt_37_build (test )
330
353
or missing_format (draft7_format_checker )(test )
331
354
or complex_email_validation (test )
332
355
or skip (
0 commit comments