On 2017-05-17 12:19, Vincent Delecroix wrote:
Here are several reasons:
   - random seeds are always the same

That can easily be fixed by explicitly changing the random seed in the doctest (probably some helper context should be provided for this)

   - impossible to have complicated test code

First of all, doctests can contain arbitrary code, so it can be as complicated as you want.

Second, you could write a dedicated test function like

def complicated_test_function(many, arguments, here):
    """
    TESTS:

        sage: complicated_test_function(1, 2, 3)
    """

This is like a unit test without requiring a new testing framework.

   - impossible to tune the tests to make it more intensive (let say I
want to run the tests for 1000 inputs rather than 10)

You can run many iterations of the doctests.

   - TESTS part are often unreadable

If the test code is complicated, using a different test framework will not help. You would just be running the same unreadable code in a different way.

   - `TestSuite(my_object).run()` is not illustrative

I don't understand what you mean with this.

--
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to