New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doctest failure depending on terminal width #16307
Comments
@astrofrog - I don't recall encountering that in doc tests, likely because I usually use example tables that are short and narrow. I notice you added |
@taldcroft - ah yes table suffers from this too, if you make your terminal e.g. 40 characters wide, some of the doctests fail. We should probably figure out a way to make all these more robust! |
I vaguely recall seeing this issue a couple month back, but I can't find the duplicate, so maybe it was never reported. However, it seems related to #15828 |
Is there a way in doctest to have some invisible Python setup that always gets run? We could configure the terminal to be big in that case. |
I couldn't find anything of the sort in https://docs.python.org/3/library/doctest.html or
I actually can't understand why it does not do the trick here. Does anyone know ? |
Maybe try removing the leading whitespace before Or maybe Tom R should use a smaller terminal. I heard 80-char width is pretty neat. 😉 |
Yes, https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html#directives (e.g., |
That looks promising for exactly this situation (consistent output of a table that can depend on terminal size). |
Maybe we could just set things globally in conftest.py? |
Right, if a global |
Reminds me #8691 :) |
Ah, so this and #8691 are the same problem? Should we close one of them as duplicate? Which one? |
If I run the test suite in a large terminal I get a doctest failure:
@taldcroft - as you must have encountered this in the table docs before, do you know of a way to prevent this?
The text was updated successfully, but these errors were encountered: