- Always write tests in the
tests
folder - The name of your test script must start with
test_
(this is default and can be changed but for sake of brevity we will let it be) - Use the
import
statement to call your module - Within your script (z.B. test_createSVG.py), declare a function that starts with
test_*
- You may have as many functions you want but the ones that are to be tested should start
with
test_*
- Now call your module within the function by providing some dummy inputs
- Remember these inputs can be intentionally wrong or right
- Write
assert
statements to check if your input returns the correct result
pytest tests/test_createSVG.py
pytest tests/*