Skip to content

Port testing to pytest #119

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

Closed
davidrudlstorfer opened this issue Nov 5, 2024 · 4 comments
Closed

Port testing to pytest #119

davidrudlstorfer opened this issue Nov 5, 2024 · 4 comments
Assignees

Comments

@davidrudlstorfer
Copy link
Collaborator

To simplify the current testing setup and to benefit from additional pytest features the testing suite should be moved to pytest.

@davidrudlstorfer davidrudlstorfer self-assigned this Nov 5, 2024
@isteinbrecher
Copy link
Collaborator

This is for sure a great improvement to the testing of MeshPy! Maybe we can also use this refactoring of the testing to “clean up” the testing structure into more clearly defined subsets of tests. I will think about what could be a good path to go here. However, does not hinder the conversion of the current structure to pytest.

@isteinbrecher
Copy link
Collaborator

Just to mention it, we have some "tests" that start with xtest_* that are used to define a base test version that can then be called with different parameters. This construct very likely simply be replaced with pytest parametrize fixtures.

@davidrudlstorfer
Copy link
Collaborator Author

davidrudlstorfer commented Dec 12, 2024

Just to collect the overall ideas for PyTest in an official way:

  • Introduce pytest fixtures for globally utilized variables and functions (i.e., reference file path, result comparison functions, ...) (see Add cosserat curve #148 for more details)
  • Introduce tagging for tests (https://pypi.org/project/pytest_tagging/) to differentiate between normal tests, performance tests and 4C tests
  • Overhaul/update tutorial to Jupyter Notebook and test in separate CI job

@davidrudlstorfer
Copy link
Collaborator Author

#157 introduced the necessary infrastructure and #170 is the issue to port the remaining tests

I'll close this one and open an issue for the tutorials

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