Repository: pytest-dev/pytest-randomly (language: python)

Issue:
Test numpy on Python 3.11
### Description

In #463 , numpy tests were disabled for Python 3.11, because it didn't support Python 3.11. Once it does, re-enable installing numpy and running its tests.


Discussion / hints:

Fix patch:
diff --git a/requirements/py310.txt b/requirements/py310.txt
index af8fe3a..6228f81 100644
--- a/requirements/py310.txt
+++ b/requirements/py310.txt
@@ -78,7 +78,7 @@ iniconfig==1.1.1 \
     --hash=sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3 \
     --hash=sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32
     # via pytest
-numpy==1.23.3 ; python_version < "3.11" \
+numpy==1.23.3 \
     --hash=sha256:004f0efcb2fe1c0bd6ae1fcfc69cc8b6bf2407e0f18be308612007a0762b4089 \
     --hash=sha256:09f6b7bdffe57fc61d869a22f506049825d707b288039d30f26a0d0d8ea05164 \
     --hash=sha256:0ea3f98a0ffce3f8f57675eb9119f3f4edb81888b6874bc1953f91e0b1d4f440 \
diff --git a/requirements/py311.txt b/requirements/py311.txt
index cfc0e1b..849701a 100644
--- a/requirements/py311.txt
+++ b/requirements/py311.txt
@@ -78,6 +78,36 @@ iniconfig==1.1.1 \
     --hash=sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3 \
     --hash=sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32
     # via pytest
+numpy==1.23.3 \
+    --hash=sha256:004f0efcb2fe1c0bd6ae1fcfc69cc8b6bf2407e0f18be308612007a0762b4089 \
+    --hash=sha256:09f6b7bdffe57fc61d869a22f506049825d707b288039d30f26a0d0d8ea05164 \
+    --hash=sha256:0ea3f98a0ffce3f8f57675eb9119f3f4edb81888b6874bc1953f91e0b1d4f440 \
+    --hash=sha256:17c0e467ade9bda685d5ac7f5fa729d8d3e76b23195471adae2d6a6941bd2c18 \
+    --hash=sha256:1f27b5322ac4067e67c8f9378b41c746d8feac8bdd0e0ffede5324667b8a075c \
+    --hash=sha256:22d43376ee0acd547f3149b9ec12eec2f0ca4a6ab2f61753c5b29bb3e795ac4d \
+    --hash=sha256:2ad3ec9a748a8943e6eb4358201f7e1c12ede35f510b1a2221b70af4bb64295c \
+    --hash=sha256:301c00cf5e60e08e04d842fc47df641d4a181e651c7135c50dc2762ffe293dbd \
+    --hash=sha256:39a664e3d26ea854211867d20ebcc8023257c1800ae89773cbba9f9e97bae036 \
+    --hash=sha256:51bf49c0cd1d52be0a240aa66f3458afc4b95d8993d2d04f0d91fa60c10af6cd \
+    --hash=sha256:78a63d2df1d947bd9d1b11d35564c2f9e4b57898aae4626638056ec1a231c40c \
+    --hash=sha256:7cd1328e5bdf0dee621912f5833648e2daca72e3839ec1d6695e91089625f0b4 \
+    --hash=sha256:8355fc10fd33a5a70981a5b8a0de51d10af3688d7a9e4a34fcc8fa0d7467bb7f \
+    --hash=sha256:8c79d7cf86d049d0c5089231a5bcd31edb03555bd93d81a16870aa98c6cfb79d \
+    --hash=sha256:91b8d6768a75247026e951dce3b2aac79dc7e78622fc148329135ba189813584 \
+    --hash=sha256:94c15ca4e52671a59219146ff584488907b1f9b3fc232622b47e2cf832e94fb8 \
+    --hash=sha256:98dcbc02e39b1658dc4b4508442a560fe3ca5ca0d989f0df062534e5ca3a5c1a \
+    --hash=sha256:a64403f634e5ffdcd85e0b12c08f04b3080d3e840aef118721021f9b48fc1460 \
+    --hash=sha256:bc6e8da415f359b578b00bcfb1d08411c96e9a97f9e6c7adada554a0812a6cc6 \
+    --hash=sha256:bdc9febce3e68b697d931941b263c59e0c74e8f18861f4064c1f712562903411 \
+    --hash=sha256:c1ba66c48b19cc9c2975c0d354f24058888cdc674bebadceb3cdc9ec403fb5d1 \
+    --hash=sha256:c9f707b5bb73bf277d812ded9896f9512a43edff72712f31667d0a8c2f8e71ee \
+    --hash=sha256:d5422d6a1ea9b15577a9432e26608c73a78faf0b9039437b075cf322c92e98e7 \
+    --hash=sha256:e5d5420053bbb3dd64c30e58f9363d7a9c27444c3648e61460c1237f9ec3fa14 \
+    --hash=sha256:e868b0389c5ccfc092031a861d4e158ea164d8b7fdbb10e3b5689b4fc6498df6 \
+    --hash=sha256:efd9d3abe5774404becdb0748178b48a218f1d8c44e0375475732211ea47c67e \
+    --hash=sha256:f8c02ec3c4c4fcb718fdf89a6c6f709b14949408e8cf2a2be5bfa9c49548fd85 \
+    --hash=sha256:ffcf105ecdd9396e05a8e58e81faaaf34d3f9875f137c7372450baa5d77c9a54
+    # via -r requirements.in
 packaging==21.3 \
     --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \
     --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522
diff --git a/requirements/py37.txt b/requirements/py37.txt
index c166e3c..bd62428 100644
--- a/requirements/py37.txt
+++ b/requirements/py37.txt
@@ -85,7 +85,7 @@ iniconfig==1.1.1 \
     --hash=sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3 \
     --hash=sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32
     # via pytest
-numpy==1.21.6 ; python_version < "3.11" \
+numpy==1.21.6 \
     --hash=sha256:1dbe1c91269f880e364526649a52eff93ac30035507ae980d2fed33aaee633ac \
     --hash=sha256:357768c2e4451ac241465157a3e929b265dfac85d9214074985b1786244f2ef3 \
     --hash=sha256:3820724272f9913b597ccd13a467cc492a0da6b05df26ea09e78b171a0bb9da6 \
diff --git a/requirements/py38.txt b/requirements/py38.txt
index e5a0dcc..dd31d11 100644
--- a/requirements/py38.txt
+++ b/requirements/py38.txt
@@ -82,7 +82,7 @@ iniconfig==1.1.1 \
     --hash=sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3 \
     --hash=sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32
     # via pytest
-numpy==1.23.3 ; python_version < "3.11" \
+numpy==1.23.3 \
     --hash=sha256:004f0efcb2fe1c0bd6ae1fcfc69cc8b6bf2407e0f18be308612007a0762b4089 \
     --hash=sha256:09f6b7bdffe57fc61d869a22f506049825d707b288039d30f26a0d0d8ea05164 \
     --hash=sha256:0ea3f98a0ffce3f8f57675eb9119f3f4edb81888b6874bc1953f91e0b1d4f440 \
diff --git a/requirements/py39.txt b/requirements/py39.txt
index 1f1ff3c..c56d8bb 100644
--- a/requirements/py39.txt
+++ b/requirements/py39.txt
@@ -82,7 +82,7 @@ iniconfig==1.1.1 \
     --hash=sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3 \
     --hash=sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32
     # via pytest
-numpy==1.23.3 ; python_version < "3.11" \
+numpy==1.23.3 \
     --hash=sha256:004f0efcb2fe1c0bd6ae1fcfc69cc8b6bf2407e0f18be308612007a0762b4089 \
     --hash=sha256:09f6b7bdffe57fc61d869a22f506049825d707b288039d30f26a0d0d8ea05164 \
     --hash=sha256:0ea3f98a0ffce3f8f57675eb9119f3f4edb81888b6874bc1953f91e0b1d4f440 \
diff --git a/requirements/requirements.in b/requirements/requirements.in
index ba20263..13a1a2a 100644
--- a/requirements/requirements.in
+++ b/requirements/requirements.in
@@ -2,6 +2,6 @@ coverage
 factory_boy
 faker
 importlib-metadata >= 3.6.0 ; python_version < "3.10"
-numpy ; python_version < "3.11"
+numpy
 pytest
 pytest-xdist


Test patch:
diff --git a/tests/test_pytest_randomly.py b/tests/test_pytest_randomly.py
index 3b57c8c..0aee635 100644
--- a/tests/test_pytest_randomly.py
+++ b/tests/test_pytest_randomly.py
@@ -6,13 +6,6 @@
 
 import pytest_randomly
 
-try:
-    import numpy  # noqa: F401
-
-    HAVE_NUMPY = True
-except ImportError:
-    HAVE_NUMPY = False
-
 pytest_plugins = ["pytester"]
 
 
@@ -674,7 +667,6 @@ def test_two(faker):
     out.assert_outcomes(passed=2)
 
 
-@pytest.mark.skipif(not HAVE_NUMPY, reason="numpy not installed")
 def test_numpy(ourtestdir):
     ourtestdir.makepyfile(
         test_one="""
@@ -692,7 +684,6 @@ def test_two():
     out.assert_outcomes(passed=2)
 
 
-@pytest.mark.skipif(not HAVE_NUMPY, reason="numpy not installed")
 def test_numpy_doesnt_crash_with_large_seed(ourtestdir):
     ourtestdir.makepyfile(
         test_one="""