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

Documentation for updating the unit tests #3336

Open
mkovari opened this issue Sep 30, 2024 · 1 comment
Open

Documentation for updating the unit tests #3336

mkovari opened this issue Sep 30, 2024 · 1 comment
Assignees
Labels

Comments

@mkovari
Copy link
Collaborator

mkovari commented Sep 30, 2024

One of the factors slowing down development is that at least one unit test always has to be updated after any change that alters the output. It would help if the procedure for updating the tests was documented.

@timothy-nunn @chris-ashe @clmould ?

@timothy-nunn
Copy link
Contributor

The scope of this issue is documenting how to write a unit test or update an existing test. I believe this can be achieved by updating the existing unit test description to provide a deeper definition of a unit test. Linking to pytest documentation will provide most of the understanding for writing a unit test.

Within our docs, I suggest we just include a light description of:

  • How to provide models via fixtures (where the code to test is a model method)
  • The basic anatomy of a unit test (provide a reproducible environment, call the function with realistic data, make assertions about the return data/state)
  • A few best-practices (e.g. test branches and intentional failure modes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants