Originally reported by: Ionel Cristian M膬rie葯 (BitBucket: ionelmc, GitHub: ionelmc)
Example output
> assert hist == ['before', 'the-return-valuex', 'after', 'finally', 'closed']
E assert ['before', 't...ly', 'closed'] == ['before', 'th...ly', 'closed']
E At index 1 diff: 'the-return-value' != 'the-return-valuex'
I use these options:
-rxEfsl
--strict
--ignore docs/conf.py
--ignore setup.py
--doctest-modules
--doctest-glob \*.rst
--tb short
_Original comment by_ Floris Bruynooghe (BitBucket: flub, GitHub: flub):
Err, I'm not so sure about your classification as bug and title re-naming. This issue was about seeing the full lists when comparing two lists. Now you've confused it with something which is potentially an other issue: -l/--tb=short interaction. If the latter is an issue it should be discussed in a separate report rather then hijack this one.
_Original comment by_ Floris Bruynooghe (BitBucket: flub, GitHub: flub):
Sorry, hijacking is probably a big word. It just seemed to me like the original report was a totally different report, so now I just don't know if you still care about the assert repr of lists or not.
On whether -l/--tb=short should work together or not I'm not in a position to say and would wait for someone else's opinion.
thoughts on making --showlocals + --tb= anything but long / auto an error? I could write up a PR for this to features
CC @nicoddemus @blueyed
It could be useful with other styles, e.g. short: https://github.com/pytest-dev/pytest/issues/1715.
thoughts on making
--showlocals+--tb=anything butlong/autoan error? I could write up a PR for this tofeatures
It could be useful with other styles, e.g. short: #1715.
+1 for making showlocals work with short. There's no reason to disable showlocals for --tb=short, it looks like a clear bug. The code comment here also indicates this wasn't intended, showlocals should only be disable for --tb=native.
Found this issue because we ran into the same problem for SciPy at https://github.com/scipy/scipy/pull/11282
@blueyed @nicoddemus is this bug not getting attention because it's low-prio, or because of the confusing description/history in the comments here? If the latter, I can open a new bug if it helps.
@rgommers no reason -- there's 480+ issues in the backlog currently -- would you like to take a stab at a PR to enable this?
Allowing --showlocals with --tb=short seems simple: #6384
thanks @pv!