From 5e4ea285e466987456ff98a03314c3f2ceb8fe2b Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Tue, 16 Nov 2021 08:15:58 -0700 Subject: [PATCH] Skip test based on content of scico/data/examples (#99) * Skip test based on content of scico/data/examples rather than content of data directory * Fixed test_data skip if for pytest. Co-authored-by: Fernando Davis --- scico/test/test_data.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scico/test/test_data.py b/scico/test/test_data.py index 67ae8cb58..583630ec8 100644 --- a/scico/test/test_data.py +++ b/scico/test/test_data.py @@ -12,9 +12,8 @@ "\nAnd after cloning run:\n\tgit submodule init && git submodule update.\n" ) -pytestmark = pytest.mark.skipif( - len(os.listdir(os.path.abspath("./data"))) == 0, reason=skipif_reason -) +examples = os.path.join(os.path.dirname(data.__file__), "examples") +pytestmark = pytest.mark.skipif(not os.path.isdir(examples), reason=skipif_reason) class TestSet: