There is more to unit testing with Pytest than can be covered in one tutorial.
If you are interested, investigate other aspects such as:
- test for error conditions (exceptions)
- edge cases (handling extreme values of valid limits, some also test values beyond the limit (boundary value testing))
- organise tests in classes - this is an alternative way to group tests, it may have advantages in some scenarios.
- parameterised tests
- doctests using the docstrings
- use of mocks (pytest-with-eric tutorial)
Other tutorials:
- RealPython: Effective testing with Python
- freeCodeCamp: Python testing for beginners (video) - includes mocks and using ChatGPT for testing