You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doctests are used in Texthero to make sure that what we think the output will look like is also what it looks like. Example:
defdouble(x):
""" Double the given input. Examples ------------- >>> f(5) 10 """return2*x
The "Examples" part is then executed by the doctest suite when running our testing script.
We have noticed that with more "complicated" outputs, we often need to skip the doctests as they do work locally, but do not work on all our travis builds (we're testing on macOS/Xenial/Windows) . The main reasons are:
different floating point representation on the OSes -> float results are different after some decimals -> tests fail
different pandas printing outputs on the OSes -> e.g. macOS prints "..." in DataFrames at a different position than the others -> tests fail
We're looking for any solution for those issues.
Preliminary Ideas
Look at the doctest module and find ways to make it work better (e.g. somehow allow some floating point epsilon); maybe the only thing not working will we DataFrames and we might be able to live with that
Doctests are used in Texthero to make sure that what we think the output will look like is also what it looks like. Example:
The "Examples" part is then executed by the doctest suite when running our testing script.
We have noticed that with more "complicated" outputs, we often need to skip the doctests as they do work locally, but do not work on all our travis builds (we're testing on macOS/Xenial/Windows) . The main reasons are:
We're looking for any solution for those issues.
Preliminary Ideas
Look at the doctest module and find ways to make it work better (e.g. somehow allow some floating point epsilon); maybe the only thing not working will we DataFrames and we might be able to live with that
(Partly) write our own doctest module (see here)
Interested in opinions!
The text was updated successfully, but these errors were encountered: