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

Unit tests kick off an ETL when run alone #3414

Open
zaneselvans opened this issue Feb 21, 2024 · 0 comments
Open

Unit tests kick off an ETL when run alone #3414

zaneselvans opened this issue Feb 21, 2024 · 0 comments
Labels
bug Things that are just plain broken. testing Writing tests, creating test data, automating testing, etc.

Comments

@zaneselvans
Copy link
Member

Describe the bug

On the main branch running the unit tests via our Make recipe works as expected and takes ~1 minute:

make pytest-unit

However, attempting to run the unit tests independently with pytest kicks off an ETL run, which should never happen, and takes a long time:

pytest test/unit

The unit tests that get run as part of our local pre-commit hook don't seem to have this problem. They use the command:

pytest --cov-fail-under=0 --doctest-modules src/pudl test/unit -m "not slow"

Even just telling pytest to report back the durations of the 20 longest tests or not to compile coverage doesn't exhibit the problem:

pytest --durations 20 test/unit
pytest --no-cov test/uni

Could this be an unexpected side effect of our new default pytest / coverage configuration @jdangerx? From #3391?

@zaneselvans zaneselvans added bug Things that are just plain broken. testing Writing tests, creating test data, automating testing, etc. labels Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that are just plain broken. testing Writing tests, creating test data, automating testing, etc.
Projects
Status: New
Development

No branches or pull requests

1 participant