Repository navigation
doctester: support comparison of floating point numbers + support future imports - #2051
Conversation
|
It should already be supported, if I remember correctly. There may have been some issue with it in python 2.5, though. |
|
I don't think that it is already supported. Consider the following example def blub(x):
"""
>>> from __future__ import division
>>> print 1/2
0.5
"""
passThe doctester seems to ignore the |
|
I have added support for |
|
Does it work in Python 2.5? |
|
Did you uncomment something slow? Two of the Travis tests timed out. |
|
No, I don't think so. Running the whole doctests ( |
|
SymPy Bot Summary: 🔴 Failed after merging thisch/doctest_floats (7e86e2c1332bee16dcc97f4e221ed5c04c5a2985) into master (8a9d10e). |
|
Does anyone have an idea which unSKIPed doctest(s) might have caused the travis timeout? |
|
I doubt they're the culprit. The Travis tests are timing out on a regular basis these days. See https://code.google.com/p/sympy/issues/detail?id=3823. If you know how to fix, it, though, that would be awesome. If you want to play with it, just set up the Travis hook for your personal repository, so that every branch you push is tested with Travis, even if it isn't in a pull request. |
|
I fixed the problem by splitting the test jobs into doctests and normal unit tests -> #2139 |
|
This is ready for merge. Any comments ? |
|
This is great. What remains from the TODO list I enumerated a while back (was that ever converted into an issue?)? |
doctester: support comparison of floating point numbers + support future imports
|
The TODO list you are talking about is here: #1901 (comment). The next thing I would like to focus on is point 5) randomized output. As I have already said a few months ago this point is difficult because the employed RNG algorithm has changed I think between py 2.7 and py3. I will post a question on SOF - maybe there is an alternative to monkeypatching the RNG in the stdlib and in numpy.. |
|
see #6959 |
Fixes #6859