Dear list,
Is there a way to test a single docstring of a function/method, or all
the docstrings in a specific class, and not an entire module?
This is useful when testing a long file, without copying the needed
docstring to a new file. This is also different than
TestSuite(obj).run(). Currently I could only find the run_doctests()
functions that accepts modules, but not objects. Should I open a ticket
to add support for objects, or a flag to the TestSuite to run the
doctest (but not recursively)?
The command-line interface of the built-in unittest module in Python
supports this usecase:
$ python -m unittest test_module.TestClass.test_method
to test a specific method.
Regards,
TB
[1] https://docs.python.org/3/library/unittest.html#command-line-interface
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-devel/860150ce-8abe-d000-539d-0099b74bef73%40gmail.com.
For more options, visit https://groups.google.com/d/optout.