From 297a4fb0f98715869d25300f1299004423818ec1 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 22 Nov 2021 20:55:27 +0100 Subject: [PATCH] Add '__tracebackhide__ = True' so the traceback is manageable --- tests/primer/test_primer_external.py | 1 + tests/primer/test_primer_stdlib.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/primer/test_primer_external.py b/tests/primer/test_primer_external.py index ffed11353d9..1f28f824632 100644 --- a/tests/primer/test_primer_external.py +++ b/tests/primer/test_primer_external.py @@ -38,6 +38,7 @@ def test_primer_external_packages_no_crash( package: PackageToLint, caplog: LogCaptureFixture, ) -> None: + __tracebackhide__ = True # pylint: disable=unused-variable TestPrimer._primer_test(package, caplog) @staticmethod diff --git a/tests/primer/test_primer_stdlib.py b/tests/primer/test_primer_stdlib.py index 178593c367e..48264e6dff7 100644 --- a/tests/primer/test_primer_stdlib.py +++ b/tests/primer/test_primer_stdlib.py @@ -47,6 +47,7 @@ def test_primer_stdlib_no_crash( test_module_location: str, test_module_name: str, capsys: CaptureFixture ) -> None: """Test that pylint does not produces any crashes or fatal errors on stdlib modules""" + __tracebackhide__ = True # pylint: disable=unused-variable os.chdir(test_module_location) with _patch_stdout(io.StringIO()): try: