diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-06-04 06:50:27 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-06-04 07:39:10 -0400 |
commit | 3e9b02bb253de93885aeada64b60fdccf412fe20 (patch) | |
tree | a79b319710d1716a4638d7bd1334138910889d78 | |
parent | 762e2c49e1b7b609271a9aece30f981bb1286829 (diff) | |
download | python-coveragepy-git-3e9b02bb253de93885aeada64b60fdccf412fe20.tar.gz |
test: hide check_coverage source in pytest tracebacks
The code for the helper is uninteresting and long, and only makes it harder to
see what is going wrong. Hide it.
https://docs.pytest.org/en/latest/example/simple.html#writing-well-integrated-assertion-helpers
-rw-r--r-- | tests/coveragetest.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py index 287b585d..80e8853a 100644 --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -133,6 +133,8 @@ class CoverageTest( Returns the Coverage object, in case you want to poke at it some more. """ + __tracebackhide__ = True # pytest, please don't show me this function. + # We write the code into a file so that we can import it. # Coverage.py wants to deal with things as modules with file names. modname = self.get_module_name() |