Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pytest configuration #2

Closed
wants to merge 1 commit into from
Closed

Conversation

tornaria
Copy link
Contributor

This makes testing as easy as running pytest.

@orlitzky orlitzky closed this in 2e1533f Jan 11, 2024
@@ -27,3 +27,6 @@ Documentation = "https://github.com/sagemath/conway-polynomials/blob/master/READ
Repository = "https://github.com/sagemath/conway-polynomials.git"
Issues = "https://github.com/sagemath/conway-polynomials/issues"
Changelog = "https://github.com/sagemath/conway-polynomials/raw/master/NEWS"

[tool.pytest.ini_options]
addopts = "--doctest-modules --doctest-glob='*.rst'"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tornaria the glob should include *.py or not? At least for me it's currently not finding any tests: conda-forge/conway-polynomials-feedstock#4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ pytest -h
...
--doctest-modules     Run doctests in all .py modules
...
$ pytest
...
collected 2 items                                                                    

README.rst .                                                                   [ 50%]
src/conway_polynomials/__init__.py .                                           [100%]
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants