diff options
author | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-21 15:32:21 +0200 |
---|---|---|
committer | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-21 16:17:36 +0200 |
commit | 1556ba294e7a79dcafeab0486c313e9b1e049c26 (patch) | |
tree | fff2fba16d78ca2134e51ef167f755ee5cbd550b /tests/checkers | |
parent | 4d202e07041734906900ec458679247372905d3b (diff) | |
download | pylint-git-1556ba294e7a79dcafeab0486c313e9b1e049c26.tar.gz |
Add two assertions for reporter
Diffstat (limited to 'tests/checkers')
-rw-r--r-- | tests/checkers/unittest_variables.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/checkers/unittest_variables.py b/tests/checkers/unittest_variables.py index c2d2d8ec3..98f15d299 100644 --- a/tests/checkers/unittest_variables.py +++ b/tests/checkers/unittest_variables.py @@ -12,6 +12,7 @@ import astroid from pylint.checkers import variables from pylint.interfaces import HIGH from pylint.testutils import CheckerTestCase, MessageTest, linter, set_config +from pylint.testutils.reporter_for_tests import GenericTestReporter REGR_DATA_DIR = str(Path(__file__).parent / ".." / "regrtest_data") @@ -212,6 +213,7 @@ class TestMissingSubmodule(CheckerTestCase): sys.path.insert(0, REGR_DATA_DIR) try: linter.check([os.path.join(REGR_DATA_DIR, "package_all")]) + assert isinstance(linter.reporter, GenericTestReporter) got = linter.reporter.finalize().strip() assert got == "E: 3: Undefined variable name 'missing' in __all__" finally: |