Skip to content

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
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