Ben Chuanlong Du's Blog

It is never too late to learn.

Write Unit Tests Using PyTest in Python

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Run pytest in the root directory of your project to run all test suites. You can run test cases in a specific test file (e.g., test_file.py) using the command …