Hi,

I am sorry for the late answer (and I am a bit surprised that nobody
else answered before).

I believe it is somehow useful to have such a feature when developing a
large piece of new code (so that one can do a relevant subset of tests
quickly). However, I am not so sure how that feature would be used once
the piece of code is published. I.e., I cannot see how that feature
would be useful in the Sage test suites, but I see potential use in
development.

Is that the use case you had in mind?

Best regards,
Simon

On 2019-07-09, TB <mathze...@gmail.com> wrote:
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/qiu3ch%2430iu%241%40blaine.gmane.org.

Reply via email to