Unit Testing with Python
Pluralsight
Course Summary
This course will help you to write good unit tests for your Python code, using tools such as unittest, doctest and py.test. Unit tests should improve code quality, and also support future development.
-
+
Course Description
This course follows on from the Pluralsight "Python Fundamentals" course, and has more detail about unit testing with Python. We will cover libraries and frameworks such as unittest, doctest and py.test. The aim is to help you to write unit tests that improve code quality, and also support future development. Good unit tests should provide immediate value in terms of reduced debugging and better design, and the investment writing them should pay back over the whole lifetime of your software.
-
+
Course Syllabus
Unit Testing with Python - Basic Example Using unittest- 34m 7s
—Course Overview 1m 58s
—Module Overview 2m 50s
—A First Test Case 4m 4s
—Another Test Case, Explanation of 'Test Runner' 4m 19s
—A Test Case Using assertRaises, Explanation of 'Test Suite' 2m 55s
—Skip a Test Case, Marking it Work In Progress 1m 51s
—Using setUp and tearDown - Explanation of 'Test Fixture' 4m 4s
—Re-Introduce the Skipped Test Case, Get it to Pass. 0m 54s
—Cest Case Design - Test Case Names as Specification. 5m 4s
—Arrange - Act - Assert - Cleanup 3m 31s
—unittest Documentation. 1m 49s
—Module Summary. 0m 48sWhy and When Should You Write Unit Tests?- 23m 59s
—Module Outline 0m 40s
—Four Reasons for Unit Testing 0m 47s
—Understanding What to Build 2m 20s
—Documenting the Units 1m 15s
—Designing the Units 2m 37s
—Detecting Regression 3m 21s
—Limitations of Unit Testing 1m 20s
—Testing as Part of Your Personal Development Process 1m 27s
—Test Last 1m 55s
—Test First 2m 15s
—Test Driven 1m 22s
—Continuous Integration 4m 5s
—Module Review 0m 30sUsing Pytest for Unit Testing in Python- 22m 28sTestable Documentation with Doctest- 29m 11sTest Doubles: Mocks, Fakes and Stubs- 40m 50sTest Coverage and Parameterized Tests- 27m 40s