-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Show entire repr of fixture values #3693
Comments
i would suggest to pretty-print it yourself what could-be done is increasing the limit with verbosity however |
That would be greatly preferred as we have thousands of tests that would need revision otherwise. |
Is the threshold for shortening the repr with If yes, could this somehow be provided as option in |
Looks like this is the relevant code: pytest/src/_pytest/_code/code.py Lines 622 to 630 in 5903f45
It takes a (Pdb) pp type(obj), len(obj)
(<class 'dict'>, 1000)
(Pdb) pp py.io.saferepr(obj)
'{0: 6009, 1: 6010, 2: 6011, 3: 6012, ...}'
(Pdb) pp py.io.saferepr(obj, maxsize=10)
'{0:......}'
(Pdb) pp py.io.saferepr(obj, maxsize=100)
'{0: 6017, 1: 6018, 2: 6019, 3: 6020, ...}'
(Pdb) pp py.io.saferepr(obj, maxsize=1000)
'{0: 6021, 1: 6022, 2: 6023, 3: 6024, ...}'
(Pdb) pp py.io.saferepr(obj, maxsize=10000)
'{0: 6025, 1: 6026, 2: 6027, 3: 6028, ...}' |
I think |
There's an internal "truncate_locals" option that gets used with |
I'm still seeing this issue with Pytest 4.6.6 (looks like #3681 is in 3.7.0, so should be included)... Am I understanding correctly that I should only need to pass edit: Oh wow, nevermind... The locals appear below the failure. |
pytest 3.6.3 on Debian 9.5 (though, I'm running in Docker and can repro on CentOS 7)
This example from StackOverflow captures what I'd like to do:
When a test fails/errors, I want the full fixture value to be shown (i.e. no
...
).No combination of
--tb long
,-v
,--full-trace
, or--showlocals
that I've tried has worked.Is there a way to do this?
The text was updated successfully, but these errors were encountered: