We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1da5022 commit dbf4631Copy full SHA for dbf4631
1 file changed
tests/test_properties.py
@@ -1,7 +1,11 @@
1
import tempfile
2
from pathlib import Path
3
4
+import pytest
5
import yaml
6
+
7
+pytest.importorskip("hypothesis")
8
9
from hypothesis import given, settings
10
from hypothesis import strategies as st
11
@@ -16,6 +20,8 @@
16
20
max_size=30,
17
21
)
18
22
23
+pattern_text = st.text(min_size=0, max_size=50).filter(lambda x: "\n" not in x and "\r" not in x)
24
19
25
26
@given(st.text(max_size=5000))
27
@settings(max_examples=100)
@@ -45,9 +51,6 @@ def test_text_file_not_detected_as_binary(data):
45
51
assert _is_binary_file(f) is False
46
52
47
53
48
-pattern_text = st.text(min_size=0, max_size=50).filter(lambda x: "\n" not in x and "\r" not in x)
49
-
50
54
@given(st.lists(pattern_text, min_size=0, max_size=20))
55
56
def test_ignore_patterns_roundtrip(patterns):
0 commit comments