You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of #1090, we now have a better organization of tests - including at least subfolders db, api and backend.
We could also add:
tests/schemas, with the tests for Pydantic schemas EDIT: this is already in-place
tests/unit, with tests of function which do not belong to any other subfolder
Tests in subfolders are typically faster and more low-level than the rest, and they should run first. This will make the CI fail faster for the large fraction of PRs that only change some specific part of the schemas, models or API.
As of #1166, the pytest output is split multiple blocks, which could be annoying to read. This is the downside of running multiple CLI pytest commands, rather than using pytest-order or similar tools. Note that deprecations/warnings are now a bit less visible.
On the other hand, here is a nice fail-fast scenario: https://github.com/fractal-analytics-platform/fractal-server/actions/runs/7556028285/job/20572204667. After adding a (fake) failing test within tests/unit, the "Test with pytest" step of the GitHub action failed in 11 seconds. This seems good enough trade-off for the moment, even though a single-pytest-command option would be even better (and it would also run locally).
As of #1090, we now have a better organization of tests - including at least subfolders
db
,api
andbackend
.We could also add:
EDIT: this is already in-placetests/schemas
, with the tests for Pydantic schemastests/unit
, with tests of function which do not belong to any other subfolderTests in subfolders are typically faster and more low-level than the rest, and they should run first. This will make the CI fail faster for the large fraction of PRs that only change some specific part of the schemas, models or API.
A reasonable order could be like
The ordering feature should be available through https://github.com/pytest-dev/pytest-order (I did not try it out yet).
EDIT: see pytest-dev/pytest-order#52 or pytest-dev/pytest-order#69
The text was updated successfully, but these errors were encountered: