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

Use test fixtures in DagmcQuery tests #86

Open
gonuke opened this issue Sep 25, 2021 · 1 comment
Open

Use test fixtures in DagmcQuery tests #86

gonuke opened this issue Sep 25, 2021 · 1 comment

Comments

@gonuke
Copy link
Member

gonuke commented Sep 25, 2021

Currently, the test for DagmcQuery require each test to open/read the same mesh file to perform queries.

pytest has built in functionality to allow you to create a DagmcFile object once and reuse it in each test, with a concept called a fixture.

It may also be possible to use a fixture to create a single DagmcQuery object to use over multiple tests, but I haven't thought through the logic of that.

@shimwell
Copy link
Member

Sounds very possible. we used the setup feature. There is also tear down option as well but I've not used that yet.

https://github.com/fusion-energy/paramak/blob/7c44d7c2d97c84e2914499a64ca1ed4bb28da49c/tests/test_parametric_reactors/test_ball_reactor.py#L14-L31

@kkiesling kkiesling mentioned this issue Oct 29, 2021
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

No branches or pull requests

2 participants