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

Name and organisation of tests #137

Open
lionelkusch opened this issue Jan 20, 2025 · 0 comments
Open

Name and organisation of tests #137

lionelkusch opened this issue Jan 20, 2025 · 0 comments
Labels
coding style question regarding formatting and declaration of functions test Question link to tests

Comments

@lionelkusch
Copy link
Collaborator

The number of tests is increasing to avoid being lost in the testing some parts of the code. I think it's important to choose a good organisation of tests and correct names.

I propose to follow the name suggestion of numpy:
https://numpy.org/doc/stable/reference/testing.html#writing-your-own-tests

The general idea is to create a file test_....py for each python file. Each test has a name starting with 'test_'. If an aspect requires multiple tests to be tested, these tests are grouped into a class.

In addition to it, we need to one-line docstring to limit the tests to a specific aspect and to document the tests.

@lionelkusch lionelkusch added test Question link to tests coding style question regarding formatting and declaration of functions labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coding style question regarding formatting and declaration of functions test Question link to tests
Projects
None yet
Development

No branches or pull requests

1 participant