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

✅ Only run completion installation tests when the env var _TYPER_RUN_INSTALL_COMPLETION_TESTS is set #995

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

svlandeg
Copy link
Member

As discussed in #866 (comment), introducing a specific env var _TYPER_RUN_INSTALL_COMPLETION_TESTS that needs to be set before --install-completion tests are run. This env var is set for tests on the CI, but would usually not be set when users run tests locally. This is to ensure no side effects or failing tests happen locally. Fixes #413.

Thanks to @rokbot for raising this issue in #866!

@svlandeg svlandeg added the repo / tests Involving the CI / test suite label Sep 17, 2024
@svlandeg svlandeg self-assigned this Sep 17, 2024
Copy link
Member Author

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

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

This seems to be working as expected. On the CI's ubuntu-latest, there are no skipped tests (as before).

Locally, without setting any env var, with this PR I get

pytest tests/test_completion/test_completion_install.py
collected 5 items
tests/test_completion:test_completion_install.py sssss          

On master, I get

pytest tests/test_completion/test_completion_install.py
collected 5 items
tests/test_completion/test_completion_install.py ..... 

i.e. these type of tests are now succesfully being skipped locally, while still running correctly on the CI.

@svlandeg svlandeg removed their assignment Sep 17, 2024
@svlandeg svlandeg marked this pull request as ready for review September 17, 2024 10:07
Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

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

Awesome, thanks! 🚀 🙇

@tiangolo tiangolo merged commit 9f9047d into fastapi:master Nov 7, 2024
26 checks passed
@svlandeg svlandeg deleted the feat/ci_isolation branch November 8, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal repo / tests Involving the CI / test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.5.0: pytest is failing
2 participants