Open ev-br opened 7 months ago
$ python dev.py -t path/to/file
does not work either, just does not do anything$ pytest --doctest-modules path/to/file
fails at (ISTM) package imports.So there are two issues, both need to be fixed from the ground up:
Also cross-ref https://github.com/ev-br/scpdt/issues/114 : should -t
go through strategy="path/to/file"
?
The technical problem is that the docstring ends without a blank line --- https://github.com/scipy/scipy/blob/main/scipy/linalg/_basic.py#L1028 --- so the parser fails to detect the end of example and consumes the rest of the docstring + code all the way until the next blank line.
This does not happen for
-s submodule
: the-t
invocation goes through thetestfile
nottestmod
. Another consequence of this is that withtestfile
we end up with a single Doctest with all examples from all docstrings. Withtestmod
we'd get a Doctest per docstring, but not withtestfile
.Stepping back, using
testfile
seems to be a hack really.