From 90dfee5da55f4b2e55a92568186dc435624d5499 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 16 Oct 2019 23:45:01 +0200 Subject: [PATCH] tests: keep numpy being optional Ref: https://github.com/pytest-dev/pytest/pull/5950#discussion_r335254774 --- setup.py | 1 - testing/python/fixtures.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index be38857b0..dcf63f6fd 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,6 @@ def main(): "mock", "nose", "requests", - "numpy", "xmlschema", ] }, diff --git a/testing/python/fixtures.py b/testing/python/fixtures.py index 4fcab0245..45c56f9a8 100644 --- a/testing/python/fixtures.py +++ b/testing/python/fixtures.py @@ -4190,6 +4190,8 @@ def test_indirect_fixture_does_not_break_scope(testdir): def test_fixture_parametrization_nparray(testdir): + pytest.importorskip("numpy") + testdir.makepyfile( """ from numpy import linspace