Skip to content

Commit 3089143

Browse files
committed
skip tests on python 3.6
1 parent 6bb7f9b commit 3089143

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

jsonschema/tests/test_jsonschema_test_suite.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,25 @@ def narrow_unicode_build(test): # pragma: no cover
8787
return
8888

8989

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+
90109
TestDraft3 = DRAFT3.to_unittest_testcase(
91110
DRAFT3.tests(),
92111
DRAFT3.format_tests(),
@@ -97,6 +116,7 @@ def narrow_unicode_build(test): # pragma: no cover
97116
format_checker=draft3_format_checker,
98117
skip=lambda test: (
99118
narrow_unicode_build(test)
119+
or python_lt_37_build(test)
100120
or missing_format(draft3_format_checker)(test)
101121
or complex_email_validation(test)
102122
or skip(
@@ -148,6 +168,7 @@ def narrow_unicode_build(test): # pragma: no cover
148168
format_checker=draft4_format_checker,
149169
skip=lambda test: (
150170
narrow_unicode_build(test)
171+
or python_lt_37_build(test)
151172
or missing_format(draft4_format_checker)(test)
152173
or complex_email_validation(test)
153174
or skip(
@@ -227,6 +248,7 @@ def narrow_unicode_build(test): # pragma: no cover
227248
format_checker=draft6_format_checker,
228249
skip=lambda test: (
229250
narrow_unicode_build(test)
251+
or python_lt_37_build(test)
230252
or missing_format(draft6_format_checker)(test)
231253
or complex_email_validation(test)
232254
or skip(
@@ -327,6 +349,7 @@ def narrow_unicode_build(test): # pragma: no cover
327349
format_checker=draft7_format_checker,
328350
skip=lambda test: (
329351
narrow_unicode_build(test)
352+
or python_lt_37_build(test)
330353
or missing_format(draft7_format_checker)(test)
331354
or complex_email_validation(test)
332355
or skip(

0 commit comments

Comments
 (0)