Skip to content
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

unable to turn off ellipses in stack traces #2871

Closed
smurfix opened this issue Oct 25, 2017 · 5 comments
Closed

unable to turn off ellipses in stack traces #2871

smurfix opened this issue Oct 25, 2017 · 5 comments
Labels
status: help wanted developers would like help from experts on this topic topic: tracebacks related to displaying and handling of tracebacks type: enhancement new feature or API change, should be merged into features branch

Comments

@smurfix
Copy link

smurfix commented Oct 25, 2017

Even when using py.test -vvvv, variables in stack traces are ellipsized when their representation gets "too long".

This is controlled by hard coded constants in py._io.saferepr.py::saferepr() (and more constants in Python's reprlib, which it inherits from), which is called from multiple locations in py._code/code.py.

Proposed solution: use pretty printing instead, at high verbosity levels.

@RonnyPfannschmidt RonnyPfannschmidt added status: help wanted developers would like help from experts on this topic topic: tracebacks related to displaying and handling of tracebacks type: enhancement new feature or API change, should be merged into features branch labels Oct 25, 2017
@nicoddemus
Copy link
Member

nicoddemus commented Oct 25, 2017

Thanks @smurfix.

I believe pytest-dev/py#154 is a step in this direction.

Also I think we can close as duplicate of #980?

@smurfix
Copy link
Author

smurfix commented Oct 26, 2017

Right … didn't find that due to wholly different search keywords. Let's continue there.

I'm somewhat unhappy with that pull request because when you have a complex data structure to report it's nearly indecipherable as a one-liner, so merely increasing the limits doesn't help that much.

@domantasjurkus
Copy link

Having the same issue, comparing two objects is cumbersome:

pytest tests/logic/test_branded_ratios.py -vvvv
...
expected = [{'asessions': 1, 'growth_categorisation': 'brand', 'hostname': 'www.blah.net', 'landingpage': '/', ...}, {'ases...', ...}, {'asessions': 1, 'growth_categorisation': 'unpaid', 'hostname': 'www.blah.fr', 'landingpage': '/', ...}]
actual = [{'asessions': 2, 'growth_categorisation': 'brand', 'hostname': 'www.blah.ru', 'landingpage': '/', ...}, {'asess...', ...}, {'asessions': 1, 'growth_categorisation': 'brand', 'hostname': 'www.blah.net', 'landingpage': '/', ...}]

@blueyed
Copy link
Contributor

blueyed commented Oct 16, 2019

Related: #5936 / #3962

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted developers would like help from experts on this topic topic: tracebacks related to displaying and handling of tracebacks type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

5 participants