2022-01-10 21:28:02 +01:00
|
|
|
---
|
|
|
|
tests/conjecture/test_utils.py | 3 ++-
|
|
|
|
tests/ghostwriter/test_expected_output.py | 2 +-
|
|
|
|
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
--- a/tests/conjecture/test_utils.py
|
|
|
|
+++ b/tests/conjecture/test_utils.py
|
|
|
|
@@ -11,7 +11,6 @@
|
2021-03-25 08:53:05 +01:00
|
|
|
from collections import Counter
|
|
|
|
from fractions import Fraction
|
|
|
|
|
|
|
|
-import numpy as np
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
from hypothesis import (
|
2022-01-10 21:28:02 +01:00
|
|
|
@@ -213,11 +212,13 @@ def test_combine_labels_is_distinct():
|
2021-03-25 08:53:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
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")
|
|
|
|
|
|
|
|
|
2022-01-10 21:28:02 +01:00
|
|
|
--- a/tests/ghostwriter/test_expected_output.py
|
|
|
|
+++ b/tests/ghostwriter/test_expected_output.py
|
|
|
|
@@ -23,13 +23,13 @@ import re
|
2021-03-25 08:53:05 +01:00
|
|
|
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):
|