-
Notifications
You must be signed in to change notification settings - Fork 1.1k
tests: Skip package installer tests on CI #6175
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,11 @@ | |
| import pytest | ||
| from testcontainers.core.container import DockerContainer | ||
|
|
||
| pytest.skip( | ||
| "These tests will only be run for the action that generates the package repository", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This unconditionally skips the module in all environments; if you intend these tests to run in a dedicated release workflow, they will be skipped there as well. You could gate the skip on a CI-specific condition so the tests still run when triggered by the release action. 🤖 Was this useful? React with 👍 or 👎 |
||
| allow_module_level=True, | ||
| ) | ||
|
|
||
|
|
||
| def check(container: DockerContainer, cmd: str): | ||
| result = container.exec(cmd) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the module-level skip runs after imports,
from testcontainers.core.container import DockerContainer(line 4) will still execute; in environments without this dependency, collection will error instead of skipping. Consider ensuring the skip occurs before optional imports so the file reliably skips when intended.🤖 Was this useful? React with 👍 or 👎