#253 docs: Add more wisdom about writing good tests
Merged by jflory7. Opened by jflory7.
change/test-wisdom  into  master

Download 253.patch

This commit adds more wisdom about best practices for writing unit
tests. This mostly comes from what someone shared with me recently about
best practices around pytest. Generally, it's best to keep tests
simple, short, and to the point.

This addition to our docs hopefully makes for a useful reference!

Metadata Update from @jflory7:
- Pull-request tagged with: PASSED, improvement, type - docs, type - quality assurance, type - summer coding

@alishapapun, could you please review this PR some time after Monday? I am curious for your feedback if this is easy to understand or if there is something that could be better explained. I think the previous explanation was a little lacking! (Spoiler: I really knew nothing about testing when I wrote it the first time.)

Mostly I want to make sure this makes sense, but it is also good practice to test it out and make sure it builds too. Since it's been a while since we have worked with the docs, here are two ways to test the docs:

With Pipenv, preferred:

cd docs/
pipenv shell
pipenv install
./test-docs.sh

With regular virtualenv:

# start virtualenv with your preferred method
cd docs/
pip install -r requirements.txt
./test-docs.sh

Once you build the docs, you can open the docs/_build/index.html page in your web browser to see them rendered.

Metadata Update from @jflory7:
- Pull-request tagged with: needs testing
- Request assigned

+1 for the standard practices for writing test cases. Its all set to be merged. :)

rebased onto 9f6312387ed47624e4680985fc2a1c3482957590

Metadata Update from @jflory7:
- Pull-request untagged with: needs testing

Super, thanks for the review @alishapapun! :raised_hands:

Merging. :ocean:

Pull-Request has been merged by jflory7