Skip to content

Commit cb99f57

Browse files
committed
shed README
1 parent be63480 commit cb99f57

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,24 @@ which takes a JSON schema and returns a strategy for allowed JSON objects.
1212

1313
```python
1414
from hypothesis import given
15+
1516
from hypothesis_jsonschema import from_schema
1617

1718

18-
@given(from_schema(
19-
{"type": "integer", "minimum": 1, "exclusiveMaximum": 10}
20-
))
19+
@given(from_schema({"type": "integer", "minimum": 1, "exclusiveMaximum": 10}))
2120
def test_integers(value):
2221
assert isinstance(value, int)
2322
assert 1 <= value < 10
2423

2524

26-
@given(from_schema(
27-
{"type": "string", "format": "card"},
28-
# Standard formats work out of the box. Custom formats are ignored
29-
# by default, but you can pass custom strategies for them - e.g.
30-
custom_formats={"card": st.sampled_from(EXAMPLE_CARD_NUMBERS)}
31-
))
25+
@given(
26+
from_schema(
27+
{"type": "string", "format": "card"},
28+
# Standard formats work out of the box. Custom formats are ignored
29+
# by default, but you can pass custom strategies for them - e.g.
30+
custom_formats={"card": st.sampled_from(EXAMPLE_CARD_NUMBERS)},
31+
)
32+
)
3233
def test_card_numbers(value):
3334
assert isinstance(value, str)
3435
assert re.match(r"^\d{4} \d{4} \d{4} \d{4}$", value)

0 commit comments

Comments
 (0)