Add doctests to the test suite
- use xdoctest to validate code snippets in docstrings
- make xdoctest part of the nox session "test" via
the new `test_docstrings()` test case
- add nox session "test-docstrings" for convenience;
also, `xdoctest.doctest_module()` does not discover
docstrings that are imported at the root of the package
=> each new module with docstrings must be added to
`test_docstrings()` by hand, which is likely forgotten
=> the nox session "test-docstrings" should run on CI
This commit is contained in:
parent
4100a7f3f5
commit
01d270e39c
5 changed files with 76 additions and 2 deletions
|
|
@ -1,4 +1,10 @@
|
|||
"""A Python library to study linear algebra."""
|
||||
"""A Python library to study linear algebra.
|
||||
|
||||
First, verify that your installation of `lalib` works:
|
||||
>>> import lalib
|
||||
>>> lalib.__version__ != '0.0.0'
|
||||
True
|
||||
"""
|
||||
|
||||
from importlib import metadata
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue