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 mocking in the tests #42

Open
jwallwork23 opened this issue Mar 21, 2023 · 1 comment
Open

Use mocking in the tests #42

jwallwork23 opened this issue Mar 21, 2023 · 1 comment
Labels
refactor A suggested reworking of the code testing Extensions and improvements to the testing infrastructure
Milestone

Comments

@jwallwork23
Copy link
Member

jwallwork23 commented Mar 21, 2023

In many cases it isn't necessary to actually build meshes, function spaces, or functions for testing. We should be able to use Python mocking instead. It should speed things up a bit.

https://docs.python.org/3/library/unittest.mock.html

@jwallwork23 jwallwork23 added the testing Extensions and improvements to the testing infrastructure label Mar 21, 2023
@jwallwork23 jwallwork23 added this to the Version 1 milestone Mar 21, 2023
@jwallwork23 jwallwork23 self-assigned this Mar 21, 2023
@jwallwork23 jwallwork23 added the refactor A suggested reworking of the code label Jul 22, 2023
@jwallwork23 jwallwork23 transferred this issue from pyroteus/pyroteus Sep 1, 2023
@jwallwork23 jwallwork23 modified the milestone: Version 1 Sep 1, 2023
@jwallwork23
Copy link
Member Author

How about we mock the mesh class in as many cases as we can get away with? e.g., tests that exceptions get raised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor A suggested reworking of the code testing Extensions and improvements to the testing infrastructure
Projects
Development

No branches or pull requests

1 participant