forked from pool/python-hypothesis
Matej Cepl
9c901a6b73
- Update to 6.8.1 * Full changelog since 5.41.2: https://hypothesis.readthedocs.io/en/latest/changes.html - Changes in major version 6: * Many functions now use PEP 3102 keyword-only arguments where passing positional arguments was deprecated since 5.5. * hypothesis.extra.django.from_model() no longer accepts model as a keyword argument, where it could conflict with fields named “model”. * randoms() now defaults to use_true_random=False. * complex_numbers() no longer accepts min_magnitude=None; either use min_magnitude=0 or just omit the argument. * hypothesis.provisional.ip4_addr_strings and ip6_addr_strings are removed in favor of ip_addresses(v=...).map(str). * register_type_strategy() no longer accepts generic types with type arguments, which were always pretty badly broken. * Using function-scoped pytest fixtures is now a health-check error, instead of a warning. - Don't test numpy and pandas for python36 (NEP29) * add distro specific importorskip-numpy-pandas.patch OBS-URL: https://build.opensuse.org/request/show/880417 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=140
46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
diff --git a/hypothesis-python/tests/conjecture/test_utils.py b/hypothesis-python/tests/conjecture/test_utils.py
|
|
index fbb837d69..e31868140 100644
|
|
--- a/hypothesis-python/tests/conjecture/test_utils.py
|
|
+++ b/hypothesis-python/tests/conjecture/test_utils.py
|
|
@@ -16,7 +16,6 @@
|
|
from collections import Counter
|
|
from fractions import Fraction
|
|
|
|
-import numpy as np
|
|
import pytest
|
|
|
|
from hypothesis import (
|
|
@@ -218,11 +217,13 @@ def test_combine_labels_is_distinct():
|
|
|
|
|
|
def test_invalid_numpy_sample():
|
|
+ np = pytest.importorskip("numpy")
|
|
with pytest.raises(InvalidArgument):
|
|
cu.check_sample(np.array([[1, 1], [1, 1]]), "array")
|
|
|
|
|
|
def test_valid_numpy_sample():
|
|
+ np = pytest.importorskip("numpy")
|
|
cu.check_sample(np.array([1, 2, 3]), "array")
|
|
|
|
|
|
diff --git a/hypothesis-python/tests/ghostwriter/test_expected_output.py b/hypothesis-python/tests/ghostwriter/test_expected_output.py
|
|
index 6cc9294e3..1e77c539a 100644
|
|
--- a/hypothesis-python/tests/ghostwriter/test_expected_output.py
|
|
+++ b/hypothesis-python/tests/ghostwriter/test_expected_output.py
|
|
@@ -27,13 +27,13 @@ import re
|
|
import sys
|
|
from typing import Sequence
|
|
|
|
-import numpy
|
|
import pytest
|
|
|
|
import hypothesis
|
|
from hypothesis.extra import ghostwriter
|
|
from hypothesis.utils.conventions import not_set
|
|
|
|
+numpy = pytest.importorskip("numpy")
|
|
|
|
@pytest.fixture
|
|
def update_recorded_outputs(request):
|