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

Add --without-cache option to tests #2051

Merged
merged 2 commits into from
Apr 6, 2024

Conversation

sneakers-the-rat
Copy link
Collaborator

Fix: #1305
Fix: #1297

The tests can be run in parallel, except for tests which make network requests because the requests cache isn't designed for it. we should have an option to disable it anyway.

The odd yield; return; pattern is because if there is any yield statement in the function, pytest expects it to yield something, so we yield nothing and then have no cleanup stage when --without-cache is passed

tests can then be run in parallel like:

pip install pytest-xdist
pytest -n auto --without-cache

@sneakers-the-rat sneakers-the-rat added the devops poetry, setuptools, actions, etc. related changes label Apr 5, 2024
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.34%. Comparing base (bdabda1) to head (5556007).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2051   +/-   ##
=======================================
  Coverage   80.34%   80.34%           
=======================================
  Files         107      107           
  Lines       11967    11967           
  Branches     3418     3418           
=======================================
  Hits         9615     9615           
  Misses       1783     1783           
  Partials      569      569           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmungall cmungall merged commit 66f4fdf into linkml:main Apr 6, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops poetry, setuptools, actions, etc. related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make tests idempotent Tests can not run in parallel, making "green" unable to speed up test running
2 participants