This course is the second in the Testing Essentials series, designed to prepare you for the PCAT™ – Certified Associate Tester with Python certification exam.
The Python for Testing 102 (PT102) is a hands-on, project-driven continuation of PT101. Across this course you’ll deepen your testing practice with both unittest and pytest, level up your use of fixtures and parameterization, mock external dependencies cleanly, and round it out with TDD and BDD.
unittest toolkit – apply test anatomy and F.I.R.S.T., write precise assertions ( assertEqual, assertAlmostEqual, assertRaises, assertCountEqual), remove duplication with setUp/tearDown and class/module hooks, use subTest(), and control runs with @skip/@expectedFailure.
pytest for speed and clarity – native assert with rich introspection, reusable fixtures (including yield cleanup) and scopes (function → session), parameterization with @pytest.mark.parametrize, markers ( skip/xfail/importorskip), targeted selection ( -k/-m), verbosity and reports ( -v, -r), and centralized config in pytest.ini.
unittest.mock (stubs/fakes/spies, Mock/MagicMock, patch with spec/create_autospec) and the pytest-mock
mocker fixture ("mock where it’s used").
pytest-cov and share results via pytest-html (including self-contained reports).
zip()), then describe behavior with Gherkin (Feature/Scenario, Given/When/Then) and bind to Python step definitions (e.g., behave).
Whether you’ve just finished PT101 or bring equivalent experience, PT102 takes you from solid basics to confident, real-world Python testing.
unittest, Module Project & Assessment setUp, tearDown, and class-level fixtures, Parameterizing tests with subTest(), Test filtering and markers, Mocking external services with unittest.mock, Module Project & Assessment unittest, Module Project & Assessment behave, Module Project & Assessment The PCAT™ – Certified Associate Tester with Python certification is a Python Institute's Testing specialization track credential that covers the most important elements of automated testing activities from the perspective of a Python programmer. The exam covers the principles of software testing, the fundamentals of unit testing, the principles of software engineering, software decomposition, and the Test-Driven and Behavior-Driven Development (TDD, BDD) approaches to programming.
The PCAT certification gives its holders confidence in their software testing and programming skills, helps them stand out in the job market, and gives them a head start on preparing for and advancing to the professional level.
Python for Testing 101 (PT101) (Beginner +)
PCEP certification, Python Essentials 1, or equivalent experience