diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-10-07 09:40:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 09:40:31 +0200 |
commit | 16c09cb48a3c66f453faccdf380aea6969d61202 (patch) | |
tree | 9cd442a7c64913f9815f6bf140ed39d0e24ac5fd /tests/test_regr.py | |
parent | d98c29d888fbfd11aa42da593c6cfc6812434ee0 (diff) | |
download | pylint-git-16c09cb48a3c66f453faccdf380aea6969d61202.tar.gz |
Refactor ``LinterStats`` (#5074)
* Refactor ``self.stats`` on linter and checker
This adds a new class ``LinterStats`` which is used to store all
kinds of stats during a run of ``pylint``. Tests have been changed
slightly to be able to use the new class.
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Diffstat (limited to 'tests/test_regr.py')
-rw-r--r-- | tests/test_regr.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_regr.py b/tests/test_regr.py index 07385a64d..6dadcf2c6 100644 --- a/tests/test_regr.py +++ b/tests/test_regr.py @@ -114,12 +114,12 @@ def modify_path() -> Iterator: def test_check_package___init__(finalize_linter: PyLinter) -> None: filename = ["package.__init__"] finalize_linter.check(filename) - checked = list(finalize_linter.stats["by_module"].keys()) # type: ignore # Refactor of PyLinter.stats necessary - assert checked == filename + checked = list(finalize_linter.stats.by_module.keys()) + assert sorted(checked) == sorted(filename) os.chdir(join(REGR_DATA, "package")) finalize_linter.check(["__init__"]) - checked = list(finalize_linter.stats["by_module"].keys()) # type: ignore + checked = list(finalize_linter.stats.by_module.keys()) assert checked == ["__init__"] |