Skip to content

Commit 783445b

Browse files
author
Release Manager
committed
sagemathgh-40474: Add pytest command to run tests in CI workflow <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Alternative to sagemath#40446. This time running pytest directly in the CI, instead of as part of `sage -t`. Removed one old test file that fails with meson since the sage cli is different then. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40474 Reported by: Tobias Diez Reviewer(s):
2 parents 6fdd6da + d42a8c1 commit 783445b

File tree

5 files changed

+3
-79
lines changed

5 files changed

+3
-79
lines changed

.github/workflows/ci-meson.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ jobs:
167167
# Ignore errors on Windows, for now
168168
pytest --doctest-ignore-import-errors --doctest -rfEs -s src || true
169169
else
170+
pytest -rfEs -s src
170171
./sage -t ${{ matrix.tests == 'all' && '--all' || '--new --long' }} -p4 --format github
171172
fi
172173

conftest.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,6 @@ def pytest_collect_file(
198198
# This is an executable file.
199199
return IgnoreCollector.from_parent(parent)
200200

201-
if file_path.name == "conftest_inputtest.py":
202-
# This is an input file for testing the doctest machinery (and contains broken doctests).
203-
return IgnoreCollector.from_parent(parent)
204-
205201
if (
206202
(
207203
file_path.name == "finite_dimensional_lie_algebras_with_basis.py"

src/conftest_inputtest.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/conftest_test.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

src/sage/cli/notebook_cmd_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ def test_invalid_notebook_choice():
3434

3535

3636
def test_help():
37-
parser = argparse.ArgumentParser()
37+
parser = argparse.ArgumentParser(prog="sage")
3838
JupyterNotebookCmd.extend_parser(parser)
39-
assert parser.format_usage() == "usage: pytest [-h] [-n [{jupyter,jupyterlab}]]\n"
39+
assert parser.format_usage() == "usage: sage [-h] [-n [{jupyter,jupyterlab}]]\n"

0 commit comments

Comments
 (0)