This adds some usage examples of Path / ExprWithPath, whose correctness are tested by doctest, run within pytest using the --doctest-modules flag.
doctest is quite limited; majorly in that everything is about the text printed out by an interactive python interpreter session. So the examples have to fit that.
Besides pytest --doctest-modules, these can also be run directly from the command-line via python -m doctest [-v] -o ELLIPSIS src/python/ksc/path.py. The -v is useful for debugging; the ELLIPSIS because this seems to be turned on by default when running under pytest. Do we want to add python3 -mdoctest -o ELLIPSIS src/python/ksc/*.py to test_pytest.sh as an additional step to document this possibility?
(I think we want to keep the pytest --doctest-modules as python3 -mdoctest produces zero output upon success, so you can't even see anything's been run; with -v there are reams of output including every line of test, every expected+actual output, and every file scanned.)
This adds some usage examples of Path / ExprWithPath, whose correctness are tested by doctest, run within pytest using the --doctest-modules flag.
doctest is quite limited; majorly in that everything is about the text printed out by an interactive python interpreter session. So the examples have to fit that.
Besides pytest --doctest-modules, these can also be run directly from the command-line via
python -m doctest [-v] -o ELLIPSIS src/python/ksc/path.py
. The-v
is useful for debugging; the ELLIPSIS because this seems to be turned on by default when running under pytest. Do we want to addpython3 -mdoctest -o ELLIPSIS src/python/ksc/*.py
totest_pytest.sh
as an additional step to document this possibility?(I think we want to keep the
pytest --doctest-modules
aspython3 -mdoctest
produces zero output upon success, so you can't even see anything's been run; with-v
there are reams of output including every line of test, every expected+actual output, and every file scanned.)