From 30891433c8730692617d4eb7ee501c110c71d6cb Mon Sep 17 00:00:00 2001 From: Hillel Arnold Date: Wed, 19 Aug 2020 17:09:53 -0400 Subject: skip tests on python 3.6 --- jsonschema/tests/test_jsonschema_test_suite.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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( -- cgit v1.2.1