SECTION 36 / 48

How pytest Finds Tests

1 min read

The lecture names test files with the test_ prefix, such as test_seller_portal.py, and test functions with the test_ prefix. Without those prefixes in the demo, pytest reports no tests run.

Example: def test_double(): assert double(10) == 20.

How pytest Finds Tests
How pytest Finds Tests
Open image ↗
How pytest Finds Tests
YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑