Skip to content

Commit 3365240

Browse files
authored
Merge pull request #171 from Sheila-nk/local-files
BUG: Correct filepath for doctest requiring local resource
2 parents f9d7065 + db9dfd2 commit 3365240

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

.github/workflows/pip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- name: Test pytest plugin
8282
# This test will fail in a venv where scipy_doctest has not been installed and the plugin has not been activated
8383
run: |
84-
test_files=("scipy_doctest/tests/module_cases.py" "scipy_doctest/tests/stopwords_cases.py")
84+
test_files=("scipy_doctest/tests/module_cases.py" "scipy_doctest/tests/stopwords_cases.py" "scipy_doctest/tests/local_file_cases.py")
8585
for file in "${test_files[@]}"; do
8686
python -m pytest "${file}" --doctest-modules
8787
done

scipy_doctest/tests/local_file_cases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Specify local files required by doctests
44
dt_config.local_resources = {
55
'scipy_doctest.tests.local_file_cases.local_files': ['local_file.txt'],
6-
'scipy_doctest.local_file_cases.sio': ['octave_a.mat']
6+
'scipy_doctest.tests.local_file_cases.sio': ['octave_a.mat']
77
}
88

99

scipy_doctest/tests/test_pytest_configuration.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ def test_stopword_cases(pytester):
4949
assert result.ret == pytest.ExitCode.OK
5050

5151

52-
@pytest.mark.xfail(reason="XXX: passes locally, fails on CI")
5352
@pytest.mark.skipif(not HAVE_SCIPY, reason='need scipy')
5453
def test_local_file_cases(pytester):
55-
"""Test that local files are found for use in doctests.
56-
"""
54+
"""Test that local files are found for use in doctests."""
5755
path_str = local_file_cases.__file__
5856
python_file = Path(path_str)
5957
result = pytester.inline_run(python_file, "--doctest-modules")

0 commit comments

Comments
 (0)