Skip to content

run_in_pyodide: Add handling for when requested packages are not built #152

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hoodmane
Copy link
Member

@hoodmane hoodmane commented Mar 24, 2025

  • When running outside of pytest, raise a RuntimeError
  • When running in pytest locally, skip the test
  • When running in pytest in CI, fail the test

Can configure whether we want the test to be skipped or failed with the skip_if_not_all_built argument.

  • Add a test

* When running outside of pytest, raise a RuntimeError
* When running in pytest locally, skip the test
* When running in pytest in CI, fail the test

Can configure whether we want the test to be skipped or failed with
the `skip_if_not_all_built` argument.
@hoodmane hoodmane force-pushed the skip-if-not-all-built branch from b18ee17 to b8fd16e Compare March 24, 2025 10:48
@@ -383,6 +384,7 @@ def __init__(
packages: Collection[str] = (),
pytest_assert_rewrites: bool = True,
*,
skip_if_not_all_built: bool = "CI" in os.environ,
Copy link
Member

Choose a reason for hiding this comment

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

I think setting the default to "CI" in os.environ might be confusing to users, as they will silently get different behavior in local and in CI. How about 1) setting the default to False, and make it configurable in the CLI option

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense. Also, it seems that what we really want is to skip if it's in one of the earlier test jobs (e.g., test_packages_no_numpy_dependents) but fail if it's in the final job.

Copy link
Member

Choose a reason for hiding this comment

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

if it's in one of the earlier test jobs (e.g., test_packages_no_numpy_dependents) but fail if it's in the final job.

Yeah, makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants