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

Pytest: Enable using markers #3392

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Pytest: Enable using markers #3392

wants to merge 2 commits into from

Conversation

PeterNerlich
Copy link
Collaborator

Short description

While working on #2297 I made a mistake that left using markers dysfunctional.

Proposed changes

  • Actually pass the specified marker to pytest, not the keyword arguments

Side effects

  • If you relied on the functionality to completely ignore a marker when no keyword was specified or to ignore the given marker string and replace it with whatever you specified as keyword, then this will be a breaking change for you

Pull Request Review Guidelines

Fix an oversight from #2297
@PeterNerlich PeterNerlich added bug Something isn't working infrastructure Issues related to the dev or production environment labels Feb 4, 2025
Copy link
Contributor

@charludo charludo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@charludo
Copy link
Contributor

charludo commented Feb 5, 2025

Btw, I also meant to ask in #3395 - do you have a working linter setup? 🙈 It's really useful to be able to get all of these messages without manually having to invoke the corresponding tools:

image

@PeterNerlich
Copy link
Collaborator Author

do you have a working linter setup?

No, I always went bare editor and terminal until now. I dislike it if my machine spins away highlighting "mistakes" where I simply didn't finish writing the line yet, restarting the process every time I change anything. I prefer running those when I explicitly intend to. I will give it a try though now that we have ruff and see whether its performance can change my mind 😁

@PeterNerlich PeterNerlich force-pushed the pytest/markers branch 2 times, most recently from 7f1c323 to 887c00e Compare February 5, 2025 11:54
Improve how tests selection is announced by the test script.

Previously:
$ tools/test.sh -m summ_ai_sanity -vv tests/summ_ai_sanity/
[...]
Running all tests in with summ_ai_sanity, tests/summ_ai_sanity/...

Now:
$ tools/test.sh -m summ_ai_sanity -vv tests/summ_ai_sanity/
[...]
Running all tests with summ_ai_sanity in "tests/summ_ai_sanity/"...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working infrastructure Issues related to the dev or production environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants