Repository navigation
Open
Labels
topic: reportingrelated to terminal output and user-facing messages and errorstype: bugproblem that needs to be addressed
Description
- a detailed description of the bug or suggestion
- output of
pip listfrom the virtual environment you are using - pytest and operating system versions
- minimal example if possible
- Not strictly minimal, but I'll see if I can minimize it sometime this week.
I have a small plugin that dynamically generates tests based on some custom boilerplate. These tests have the following form [0]:
# In Item subclass
def runtest(self):
assert self.function(*self.args, **self.kwargs)One such test happens to fail, with the following traceback: [1]. pytest.fail also results in similar output. Clearly, something went wrong – even frames with __tracebackhide__ are getting shown.
pip list
Package Version Location
------------------- ----------------------- ------------------------------------------------------------
appdirs 1.4.4
attrs 20.1.0
black 19.10b1.dev141+g820f387 <snip>/.venv/src/black/src
cfgv 3.2.0
click 7.1.2
distlib 0.3.1
docutils 0.16
filelock 3.0.12
flake8 3.8.3
flake8-bugbear 20.1.4
flake8-plugin-utils 1.3.1
flake8-pytest-style 1.2.3
hypothesis 5.28.0
identify 1.4.28
iniconfig 1.0.1
isort 5.4.2
mccabe 0.6.1
more-itertools 8.4.0
mypy 0.782
mypy-extensions 0.4.3
nodeenv 1.5.0
packaging 20.4
pathspec 0.8.0
pip 20.1.1
pluggy 0.13.1
ppcg 0.0.0 <snip>/src
pre-commit 2.7.1
py 1.9.0
pycodestyle 2.6.0
pyflakes 2.2.0
Pygments 2.6.1
pyparsing 2.4.7
pyperclip 1.8.0
pyroma 2.6
pytest 6.0.1
PyYAML 5.3.1
regex 2020.7.14
setuptools 47.1.0
six 1.15.0
sortedcontainers 2.2.2
toml 0.10.1
typed-ast 1.4.1
typing-extensions 3.7.4.3
virtualenv 20.0.31
vulture 1.5
Metadata
Metadata
Assignees
Labels
topic: reportingrelated to terminal output and user-facing messages and errorstype: bugproblem that needs to be addressed
Activity
asottile commentedon Aug 27, 2020
it's easily reproducible with the
nonpythonexample in the docs, but by removing the custom exception repr / failure messagingasottile commentedon Aug 27, 2020
this improves the output:
but I suspect that the expectation is if you implement an
Itemyou should also implementrepr_failureasottile commentedon Aug 27, 2020
(note that while it improves the output, it still contains many frames of pytest plugin calls)
gdhameeja commentedon Aug 31, 2020
I'd like to work on this.