diff options
author | Julian Berman <Julian@GrayVines.com> | 2018-08-19 22:31:54 +0200 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2018-08-19 22:31:54 +0200 |
commit | 282f0f9ea769e8df7d4ff8338a843b2d4359904e (patch) | |
tree | 53779d9c357695cc3390c6b84c0c1a3eee728bce | |
parent | b3a6edd07d9d8aae9a4aa028864a71426d788734 (diff) | |
download | jsonschema-282f0f9ea769e8df7d4ff8338a843b2d4359904e.tar.gz |
Simpler.
-rw-r--r-- | jsonschema/tests/test_jsonschema_test_suite.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/jsonschema/tests/test_jsonschema_test_suite.py b/jsonschema/tests/test_jsonschema_test_suite.py index 7ee8e2d..9634bb7 100644 --- a/jsonschema/tests/test_jsonschema_test_suite.py +++ b/jsonschema/tests/test_jsonschema_test_suite.py @@ -30,18 +30,15 @@ DRAFT4 = SUITE.collection(name="draft4") DRAFT6 = SUITE.collection(name="draft6") -def maybe_skip(test_fn, test, skip): - reason = skip(test) - return unittest.skipIf(reason is not None, reason)(test_fn) +def maybe_skip(reason): + return unittest.skipIf(reason is not None, reason) def load_json_cases(name, *suites, **kwargs): skip = kwargs.pop("skip", lambda test: None) methods = { - test.method_name: maybe_skip( - test_fn=test.to_unittest_method(**kwargs), - test=test, - skip=skip, + test.method_name: maybe_skip(skip(test))( + test.to_unittest_method(**kwargs), ) for suite in suites for test in suite |