summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHillel Arnold <helrond@hotmail.com>2020-08-19 17:09:53 -0400
committerHillel Arnold <helrond@hotmail.com>2020-08-19 17:09:53 -0400
commit30891433c8730692617d4eb7ee501c110c71d6cb (patch)
treeea3354612b072160c2e416ac847de13cb5b2ac81
parent6bb7f9b28ca63a43ebdb304b8aa2ae009aa49d80 (diff)
downloadjsonschema-30891433c8730692617d4eb7ee501c110c71d6cb.tar.gz
skip tests on python 3.6
-rw-r--r--jsonschema/tests/test_jsonschema_test_suite.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/jsonschema/tests/test_jsonschema_test_suite.py b/jsonschema/tests/test_jsonschema_test_suite.py
index 8939b5c..1205957 100644
--- a/jsonschema/tests/test_jsonschema_test_suite.py
+++ b/jsonschema/tests/test_jsonschema_test_suite.py
@@ -87,6 +87,25 @@ else:
return
+if sys.version_info < (3, 7):
+ message = "Not running tests which require Python 3.7 or greater"
+
+ def python_lt_37_build(test):
+ return skip(
+ message=bug(685),
+ subject="date",
+ description="invalidates non-padded month dates",
+ )(test)
+ or skip(
+ message=bug(685),
+ subject="date",
+ description="invalidates non-padded day dates",
+ )(test)
+else:
+ def python_lt_37_build(test):
+ return
+
+
TestDraft3 = DRAFT3.to_unittest_testcase(
DRAFT3.tests(),
DRAFT3.format_tests(),
@@ -97,6 +116,7 @@ TestDraft3 = DRAFT3.to_unittest_testcase(
format_checker=draft3_format_checker,
skip=lambda test: (
narrow_unicode_build(test)
+ or python_lt_37_build(test)
or missing_format(draft3_format_checker)(test)
or complex_email_validation(test)
or skip(
@@ -148,6 +168,7 @@ TestDraft4 = DRAFT4.to_unittest_testcase(
format_checker=draft4_format_checker,
skip=lambda test: (
narrow_unicode_build(test)
+ or python_lt_37_build(test)
or missing_format(draft4_format_checker)(test)
or complex_email_validation(test)
or skip(
@@ -227,6 +248,7 @@ TestDraft6 = DRAFT6.to_unittest_testcase(
format_checker=draft6_format_checker,
skip=lambda test: (
narrow_unicode_build(test)
+ or python_lt_37_build(test)
or missing_format(draft6_format_checker)(test)
or complex_email_validation(test)
or skip(
@@ -327,6 +349,7 @@ TestDraft7 = DRAFT7.to_unittest_testcase(
format_checker=draft7_format_checker,
skip=lambda test: (
narrow_unicode_build(test)
+ or python_lt_37_build(test)
or missing_format(draft7_format_checker)(test)
or complex_email_validation(test)
or skip(