-
Notifications
You must be signed in to change notification settings - Fork 61
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
Automatic test discovery sans boilerplate #1693
Conversation
…gue script from there
Merged in to prep for upcoming PR with some changes needed
I require to build catalogues in CI, which overlaps with #1632, so I merged it in and will merge master once that PR is merged. |
…n catalogue script from there" This reverts commit 02a1cd1.
Some devtools behave differently if they're not.
I added
Disadvantages are that tests that run exclusively with/without MPI need to be marked explicitly with the decorators, but that's 1 line of code per file. |
This reverts commit 94665b3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
adresses #1687, closes #1463.
Removed all of the verbose deprecated boiler plate in favor of automatic discovery.
Threw in a little fixture system for extra points:
If anyone wants to add fixtures all they have to do is write a function/class in
python/test/fixtures.py
and decorate it with the internal_fixture
or_singleton_fixture
decorators. Then they can be used in test files as decorators that inject parameters with their name like in the example above:Fixtures added:
@repo_path
returns thepathlib.Path
to the repo root@context
returns anarbor.context
with MPI (if enabled) and `mpi4py comm (if enabled). Auto inits MPI.@dummy_catalogue
returns anarbor.catalogue
with thedummy
mech in it, usesbuild-catalogue
, builds under MPI on one node, doesn't stall if there's build errors.@empty_recipe
returns an instance of anarbor.recipe
without anything defined in it.