pytest: "-l" does not dump variables where "--tb" is not "long"
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
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 15 (12 by maintainers)
Commits related to this issue
- setup.cfg: do not use --tb=short by default It silently ignores `-l` etc, and should be used on-demand only. Ref: https://github.com/pytest-dev/pytest/issues/494 — committed to blueyed/pytest-cov by blueyed 5 years ago
- setup.cfg: do not use --tb=short by default (#363) It silently ignores `-l` etc, and should be used on-demand only. Ref: https://github.com/pytest-dev/pytest/issues/494 — committed to pytest-dev/pytest-cov by blueyed 5 years ago
- Make --showlocals work together with --tb=short Enable showing local variables when asked to do so in the short traceback mode. Fix #494 — committed to pv/pytest by pv 5 years ago
- Make --showlocals work together with --tb=short Enable showing local variables when asked to do so in the short traceback mode. Fix #494 — committed to pv/pytest by pv 5 years ago
- Make --showlocals work together with --tb=short Enable showing local variables when asked to do so in the short traceback mode. Fixes #494 — committed to pv/pytest by pv 5 years ago
- Make --showlocals work together with --tb=short Enable showing local variables when asked to do so in the short traceback mode. Fixes #494 — committed to pv/pytest by pv 5 years ago
- Make --showlocals work together with --tb=short Enable showing local variables when asked to do so in the short traceback mode. Fixes #494 — committed to pv/pytest by pv 5 years ago
- Make --showlocals work together with --tb=short Enable showing local variables when asked to do so in the short traceback mode. Fixes #494 — committed to pv/pytest by pv 5 years ago
- Make --showlocals work together with --tb=short Enable showing local variables when asked to do so in the short traceback mode. Fixes #494 — committed to pv/pytest by pv 5 years ago
- Make --showlocals work together with --tb=short Enable showing local variables when asked to do so in the short traceback mode. Fixes #494 — committed to pv/pytest by pv 5 years ago
- Merge pull request #6384 from pv/showlocals-short Make --showlocals work together with --tb=short Fixes https://github.com/pytest-dev/pytest/issues/494 Ref: https://github.com/pytest-dev/pytest/i... — committed to pytest-dev/pytest by blueyed 4 years ago
Allowing
--showlocalswith--tb=shortseems simple: #6384+1 for making
showlocalswork withshort. There’s no reason to disableshowlocalsfor--tb=short, it looks like a clear bug. The code comment here also indicates this wasn’t intended,showlocalsshould 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