This repository was archived by the owner on Apr 29, 2024. It is now read-only.
forked from reverbc/pylint-pytest
-
Notifications
You must be signed in to change notification settings - Fork 2
🐛 Ignore collection failures in non-tests #1
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Stavros Ntentos <[email protected]>
4f82aff
to
366bb04
Compare
… only `pylint<3`, coverage at Codecov, drop other CI Signed-off-by: Stavros Ntentos <[email protected]>
CI: Use GH-Actions, drop the rest, MOAR Pythons, MOAR OSes, coverage at Codecov Additionally: * Update `.gitignore` * Mark the plugin supporting only `pylint<3`
Store all tools' configurations in `pyproject.toml`, even if right now only the `setup.py` file is used. Keep `.pylintrc` separately. It is 300 lines; default `--generate-toml-config` gives 600 😅 Comment-out hooks that need >0 work to be green. Signed-off-by: Stavros Ntentos <[email protected]>
Signed-off-by: Stavros Ntentos <[email protected]>
Signed-off-by: Stavros Ntentos <[email protected]>
Signed-off-by: Stavros Ntentos <[email protected]>
Signed-off-by: Stavros Ntentos <[email protected]>
Most of the issues are "almost clear-cut", except the astroid stuff - `pylint_pytest/checkers/class_attr_loader.py`. Those were mostly placated (but hopefully done right). Additionally, add some sanity features to `BasePytestTester`: * Marked class as `ABC` * Enforce subclasses to initialize `MSG_ID` Mostly both of those changes are "aesthetical", and do not contribute to strict guarantees of behavior, or type assertions. But at least `pytest` cries loudly when used wrong - so that's something. Signed-off-by: Stavros Ntentos <[email protected]>
... and `f{msg_id=}` Signed-off-by: Stavros Ntentos <[email protected]>
Activate mypy in pre-commit
Signed-off-by: Stavros Ntentos <[email protected]>
* Configure action `concurrency:` * Use `codecov/codecov-action@v3` flags (might ... help codecov, somehow) * Upload testing artifacts * Add the Codecov badge in the README.md Signed-off-by: Stavros Ntentos <[email protected]>
* Drop `py312` to combat #16 * Install `--editable`, so that Python uses the correct source files for coverage * Ignore `tests/input/**/*.py` from coverage - they are not ran properly * Again improve on artifact naming Signed-off-by: Stavros Ntentos <[email protected]>
Additionally, fixes #13 Signed-off-by: Stavros Ntentos <[email protected]>
* Drop `tests/*` both from `sdist` and `wheel` * Drop `universal` wheel (we don't support Python2) Signed-off-by: Stavros Ntentos <[email protected]>
See more details in #19
Signed-off-by: Stavros Ntentos <[email protected]>
See more details in #2
This change applies the pre-existing patterns to identify if the files with collection problems are tests. It is then used to eliminate the false-positives of F6401 (cannot-enumerate-pytest-fixtures). As a side effect, this patch also includes precise file paths that may be used to reproduce the problem. Fixes reverbc#20 Fixes reverbc#21 Signed-off-by: Sviatoslav Sydorenko <[email protected]> _Replayed; Source PR: https://github.com/reverbc/pylint-pytest/pull/22_ Additionally, satisfied the https://github.com/pylint-dev/pylint-pytest's `.pre-commit-config.yaml` Signed-off-by: Stavros Ntentos <[email protected]>
* Capture and return `stdout` and `stderr` (instead of trashing them) * Fix the 'duplicate-path' error by `relative`-izing the paths before `union`ing them * Update tests to test for both conditions Additionally, fix two `used-before-assignment` pylint issues (`stdout`, `stderr`) 🤪 Signed-off-by: Stavros Ntentos <[email protected]>
366bb04
to
abc9f22
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change applies the pre-existing patterns to identify if the files with collection problems are tests. It is then used to eliminate the false-positives of F6401 (cannot-enumerate-pytest-fixtures).
As a side effect, this patch also includes precise file paths that may be used to reproduce the problem.
Fixes reverbc#20
Fixes reverbc#21
Replayed; Source PR: reverbc#22
Additionally:
Signed-off-by: Stavros Ntentos [email protected]