Run all test in project:
pytest
Name all tests either starting with test_
or ending with _test
for pytest to detect them automatically
- Use
pytest name_of_file.py
to run tests for that file. - Use
pytest name_of_file.py::function_name
to run tests for a specific function being tested.
Use the -v
option (which stands for --verbose
) to see more info on the test(s) ran:
pytest <name-of-file> -v
Video explaining the absolute imports: https://youtu.be/ZBYDbAQKs3I?si=XXohK3xVkVzkuz1N
Here's a video explaianing the how Imports work: https://youtu.be/cONc0NcKE7s?si=JcMNeAfxNZNh0AZ3
Please type in these codes into VSCode's extenion tab and download so we can all work with the same formatting rules.
ms-python.black-formatter
ms-python.isort