Skip to content

Commit 4d079f7

Browse files
authored
Merge pull request #4104 from Zac-HD/update-deps
Update dependencies + test cleanups
2 parents a64b71c + 1caa0f2 commit 4d079f7

File tree

15 files changed

+84
-81
lines changed

15 files changed

+84
-81
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ jobs:
150150
strategy:
151151
matrix:
152152
python:
153-
- version: "3.9"
154153
- version: "3.11"
155154
- version: "3.11"
156155
architecture: "x86"

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ if [ -n "${GITHUB_ACTIONS-}" ] || [ -n "${CODESPACES-}" ] ; then
2525
else
2626
# Otherwise, we install it from scratch
2727
# NOTE: tooling keeps this version in sync with ci_version in tooling
28-
"$SCRIPTS/ensure-python.sh" 3.10.14
29-
PYTHON=$(pythonloc 3.10.14)/bin/python
28+
"$SCRIPTS/ensure-python.sh" 3.10.15
29+
PYTHON=$(pythonloc 3.10.15)/bin/python
3030
fi
3131

3232
TOOL_REQUIREMENTS="$ROOT/requirements/tools.txt"

hypothesis-python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def local_file(name):
6060
"pytest": ["pytest>=4.6"],
6161
"dpcontracts": ["dpcontracts>=0.4"],
6262
"redis": ["redis>=3.0.0"],
63-
"crosshair": ["hypothesis-crosshair>=0.0.13", "crosshair-tool>=0.0.70"],
63+
"crosshair": ["hypothesis-crosshair>=0.0.14", "crosshair-tool>=0.0.71"],
6464
# zoneinfo is an odd one: every dependency is conditional, because they're
6565
# only necessary on old versions of Python or Windows systems or emscripten.
6666
"zoneinfo": [

hypothesis-python/tests/cover/test_regex.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ def test_fullmatch_generates_example(pattern, matching_str):
429429
find_any(
430430
st.from_regex(pattern, fullmatch=True),
431431
lambda s: s == matching_str,
432-
settings(max_examples=10**6),
433432
)
434433

435434

hypothesis-python/tests/nocover/test_complex_numbers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@
1010

1111
import pytest
1212

13-
from hypothesis import given, settings, strategies as st
13+
from hypothesis import given, strategies as st
1414

1515

1616
@pytest.mark.parametrize("width", [32, 64, 128])
1717
@pytest.mark.parametrize("keyword", ["min_magnitude", "max_magnitude"])
1818
@given(data=st.data())
19-
@settings(max_examples=1000)
2019
def test_magnitude_validates(width, keyword, data):
2120
# See https://github.com/HypothesisWorks/hypothesis/issues/3573
2221
component_width = width / 2

hypothesis-python/tests/nocover/test_database_usage.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,18 @@ def condition(x):
100100
invalid.add(value)
101101
with deterministic_PRNG():
102102
stuff()
103-
104103
assert len(all_values(database)) < original
105104

106105

107106
def test_respects_max_examples_in_database_usage():
108107
key = b"a database key"
109108
database = InMemoryExampleDatabase()
110109
do_we_care = True
111-
counter = [0]
110+
counter = 0
112111

113112
def check(x):
114-
counter[0] += 1
113+
nonlocal counter
114+
counter += 1
115115
return do_we_care and has_a_non_zero_byte(x)
116116

117117
def stuff():
@@ -129,9 +129,10 @@ def stuff():
129129
stuff()
130130
assert len(all_values(database)) > 10
131131
do_we_care = False
132-
counter[0] = 0
133-
stuff()
134-
assert counter == [10]
132+
counter = 0
133+
with deterministic_PRNG():
134+
stuff()
135+
assert counter == 10
135136

136137

137138
def test_does_not_use_database_when_seed_is_forced(monkeypatch):

hypothesis-python/tests/numpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
import warnings
1818

1919
with warnings.catch_warnings():
20-
warnings.simplefilter("ignore", EncodingWarning)
20+
warnings.simplefilter("ignore", EncodingWarning) # noqa # not undefined
2121
import numpy.testing # noqa

hypothesis-python/tests/numpy/test_from_dtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_is_t(x):
6969
test_is_t()
7070

7171

72-
@settings(max_examples=100)
72+
@settings(max_examples=100, deadline=None)
7373
@given(nps.nested_dtypes(max_itemsize=400), st.data())
7474
def test_infer_strategy_from_dtype(dtype, data):
7575
# Given a dtype

requirements/coverage.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ libcst
88
numpy
99
pandas
1010
pyarrow # Silence warning from Pandas >=2.2, <3 - see https://github.com/pandas-dev/pandas/issues/54466
11+
pytest-cov
1112
python-dateutil
1213
pytz
1314
typing-extensions
1415
-r test.in
15-
# Need the unreleased compatibility fix for pytest-xdist rsyncdirs deprecation
16-
git+https://github.com/pytest-dev/pytest-cov.git@9757222e2e044361e70125ebdd96e5eb87395983

requirements/coverage.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ annotated-types==0.7.0
99
async-timeout==4.0.3
1010
# via redis
1111
attrs==24.1.0
12-
# via hypothesis (hypothesis-python/setup.py)
12+
# via
13+
# -r requirements/test.in
14+
# hypothesis (hypothesis-python/setup.py)
1315
black==24.8.0
1416
# via -r requirements/coverage.in
1517
click==8.1.7
@@ -26,7 +28,7 @@ exceptiongroup==1.2.2 ; python_version < "3.11"
2628
# pytest
2729
execnet==2.1.1
2830
# via pytest-xdist
29-
fakeredis==2.23.5
31+
fakeredis==2.24.1
3032
# via -r requirements/coverage.in
3133
iniconfig==2.0.0
3234
# via pytest
@@ -36,7 +38,7 @@ libcst==1.4.0
3638
# via -r requirements/coverage.in
3739
mypy-extensions==1.0.0
3840
# via black
39-
numpy==2.0.1
41+
numpy==2.1.1
4042
# via
4143
# -r requirements/coverage.in
4244
# pandas
@@ -51,28 +53,28 @@ pathspec==0.12.1
5153
# via black
5254
pexpect==4.9.0
5355
# via -r requirements/test.in
54-
platformdirs==4.2.2
56+
platformdirs==4.3.3
5557
# via black
5658
pluggy==1.5.0
5759
# via pytest
5860
ptyprocess==0.7.0
5961
# via pexpect
6062
pyarrow==17.0.0
6163
# via -r requirements/coverage.in
62-
pytest==8.3.2
64+
pytest==8.3.3
6365
# via
6466
# -r requirements/test.in
6567
# pytest-cov
6668
# pytest-xdist
67-
pytest-cov @ git+https://github.com/pytest-dev/pytest-cov.git@9757222e2e044361e70125ebdd96e5eb87395983
69+
pytest-cov==5.0.0
6870
# via -r requirements/coverage.in
6971
pytest-xdist==3.6.1
7072
# via -r requirements/test.in
7173
python-dateutil==2.9.0.post0
7274
# via
7375
# -r requirements/coverage.in
7476
# pandas
75-
pytz==2024.1
77+
pytz==2024.2
7678
# via
7779
# -r requirements/coverage.in
7880
# pandas

0 commit comments

Comments
 (0)