Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(anta)!: Make multiple tags filtering work properly (and fall pytest cleaning) #827

Merged
merged 42 commits into from
Sep 18, 2024

Conversation

mtache
Copy link
Collaborator

@mtache mtache commented Sep 12, 2024

This PR started as a PR to Refactor pytest tests, and (wo)man it did

but here what's included:

  • Refactor of fixtures, tests
  • Reordering of fixtures
  • Also disable various pylint rules implemented in Ruff and mypy - which led to new tests being needed
  • new tests
  • mocking with respx
  • doc updates
  • doc cleaning

and more importantly several fixes among which:

  • make multiple tags filter work: before that when multiple filters were given, all tests from all matching tags were run on all devices and the world was sad.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

.gitignore Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
tests/lib/fixture.py Outdated Show resolved Hide resolved
tests/units/result_manager/test_models.py Show resolved Hide resolved
tests/units/result_manager/test_models.py Show resolved Hide resolved
@mtache mtache mentioned this pull request Sep 12, 2024
8 tasks
pyproject.toml Outdated Show resolved Hide resolved
@mtache mtache marked this pull request as ready for review September 13, 2024 10:27
@gmuloc
Copy link
Collaborator

gmuloc commented Sep 13, 2024

PR needs new tests to pass SonarCloud - will check it on Monday

tests/conftest.py Outdated Show resolved Hide resolved
tests/units/test_models.py Show resolved Hide resolved
tests/units/test_runner.py Outdated Show resolved Hide resolved
tests/units/test_runner.py Outdated Show resolved Hide resolved
tests/units/test_runner.py Show resolved Hide resolved
tests/units/test_runner.py Show resolved Hide resolved
anta/runner.py Show resolved Hide resolved
docs/cli/tag-management.md Outdated Show resolved Hide resolved
docs/cli/tag-management.md Outdated Show resolved Hide resolved
docs/cli/tag-management.md Outdated Show resolved Hide resolved
docs/cli/tag-management.md Outdated Show resolved Hide resolved
docs/cli/tag-management.md Show resolved Hide resolved
tests/units/test_runner.py Show resolved Hide resolved
Copy link

@gmuloc gmuloc changed the title refactor: pytest cleanup Fix(anta): Make multiple tags filtering work properly (and fall pytest cleaning) Sep 18, 2024
@gmuloc gmuloc changed the title Fix(anta): Make multiple tags filtering work properly (and fall pytest cleaning) Fix(anta)!: Make multiple tags filtering work properly (and fall pytest cleaning) Sep 18, 2024
@gmuloc gmuloc changed the title Fix(anta)!: Make multiple tags filtering work properly (and fall pytest cleaning) fix(anta)!: Make multiple tags filtering work properly (and fall pytest cleaning) Sep 18, 2024
@gmuloc gmuloc merged commit 5a4cf40 into aristanetworks:main Sep 18, 2024
32 of 34 checks passed
@mtache mtache deleted the test/refactor branch September 18, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants