From 62704355d683b6cdaed82b105eff31da7f3c7a01 Mon Sep 17 00:00:00 2001 From: Sheila-nk Date: Tue, 13 Aug 2024 12:40:26 +0300 Subject: [PATCH 1/2] BUG: correct filepath for local resource --- scipy_doctest/tests/local_file_cases.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scipy_doctest/tests/local_file_cases.py b/scipy_doctest/tests/local_file_cases.py index e5b6328..d8b4e5c 100644 --- a/scipy_doctest/tests/local_file_cases.py +++ b/scipy_doctest/tests/local_file_cases.py @@ -3,7 +3,7 @@ # Specify local files required by doctests dt_config.local_resources = { 'scipy_doctest.tests.local_file_cases.local_files': ['local_file.txt'], - 'scipy_doctest.local_file_cases.sio': ['octave_a.mat'] + 'scipy_doctest.tests.local_file_cases.sio': ['octave_a.mat'] } From db9dfd230856d5032168c3a17ff537493db9c786 Mon Sep 17 00:00:00 2001 From: Sheila-nk Date: Tue, 13 Aug 2024 13:19:17 +0300 Subject: [PATCH 2/2] MAINT: remove xfail marker and update pytest plugin test run --- .github/workflows/pip.yml | 2 +- scipy_doctest/tests/test_pytest_configuration.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml index daa0140..1cdccc4 100644 --- a/.github/workflows/pip.yml +++ b/.github/workflows/pip.yml @@ -81,7 +81,7 @@ jobs: - name: Test pytest plugin # This test will fail in a venv where scipy_doctest has not been installed and the plugin has not been activated run: | - test_files=("scipy_doctest/tests/module_cases.py" "scipy_doctest/tests/stopwords_cases.py") + test_files=("scipy_doctest/tests/module_cases.py" "scipy_doctest/tests/stopwords_cases.py" "scipy_doctest/tests/local_file_cases.py") for file in "${test_files[@]}"; do python -m pytest "${file}" --doctest-modules done diff --git a/scipy_doctest/tests/test_pytest_configuration.py b/scipy_doctest/tests/test_pytest_configuration.py index 56d5f38..c5e44dd 100644 --- a/scipy_doctest/tests/test_pytest_configuration.py +++ b/scipy_doctest/tests/test_pytest_configuration.py @@ -49,11 +49,9 @@ def test_stopword_cases(pytester): assert result.ret == pytest.ExitCode.OK -@pytest.mark.xfail(reason="XXX: passes locally, fails on CI") @pytest.mark.skipif(not HAVE_SCIPY, reason='need scipy') def test_local_file_cases(pytester): - """Test that local files are found for use in doctests. - """ + """Test that local files are found for use in doctests.""" path_str = local_file_cases.__file__ python_file = Path(path_str) result = pytester.inline_run(python_file, "--doctest-modules")