Skip to content

Commit 3d343ff

Browse files
committed
Skip very slow tests
1 parent c5d2cf7 commit 3d343ff

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

src/hypothesis_jsonschema/_canonicalise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def merged(schemas: List[Any]) -> Optional[Schema]:
660660
# not in the schema and there were unmergable pattern schemas.
661661
return None
662662
m = merged([out_combined, s_combined])
663-
if m is None:
663+
if m is None: # pragma: no cover
664664
return None
665665
out_props[prop_name] = m
666666
# With all the property names done, it's time to handle the patterns. This is

tests/test_from_schema.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ def test_invalid_regex_emit_warning(schema):
139139
# Apparently we're not handling this one correctly?
140140
"draft4/additionalProperties should not look in applicators",
141141
"draft7/additionalProperties should not look in applicators",
142+
# $id (sometimes) rejected as invalid/unknown URL type
143+
"A JSON schema for a Dolittle bounded context's artifacts",
144+
"A JSON schema for a Dolittle bounded context's resource configurations",
145+
# This one fails because of a hard-to-find (and on the surface impossible)
146+
# counterexample involving oneOf, which doesn't fail if validated directly!
147+
# {'requirements': {'': [{'location': None, 'rule': 'dir'}]}}
148+
"CLI config for enforcing environment settings",
142149
}
143150
SLOW_SCHEMAS = {
144151
"snapcraft project (https://snapcraft.io)",
@@ -162,6 +169,13 @@ def test_invalid_regex_emit_warning(schema):
162169
"Ansible task files-2.7",
163170
"Ansible task files-2.9",
164171
"JSON Schema for GraphQL Code Generator config file",
172+
"Schema for CircleCI 2.0 config files",
173+
"Schema for Camel K YAML DSL",
174+
"The AWS Serverless Application Model (AWS SAM, previously known as Project Flourish) extends AWS CloudFormation to provide a simplified way of defining the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application.",
175+
"AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment.",
176+
"JSON API document",
177+
"Prometheus configuration file",
178+
"JSON schema for electron-build configuration file.",
165179
# oneOf on property names means only objects are valid, but it's a very
166180
# filter-heavy way to express that. TODO: canonicalise oneOf to anyOf.
167181
"draft7/oneOf complex types",

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ deps =
2222
--requirement deps/test.txt
2323
commands =
2424
pip install --no-deps --editable .
25-
pytest {posargs:-n auto}
25+
pytest {posargs:-n auto --durations=5}
2626

2727
[testenv:deps]
2828
description = Updates test corpora and the pinned dependencies in `deps/*.txt`

0 commit comments

Comments
 (0)