Unit Testing and Test Driven Development in Python
Offered By: LinkedIn Learning
Course Description
Overview
Discover how to develop reliable, high-quality Python code with unit testing and test-driven development.
Syllabus
Introduction
- Welcome
- What is unit testing?
- What is test-driven development (TDD)?
- Example TDD session: The FizzBuzz Kata
- Python virtual environments
- Set up pytest in PyCharm
- Set up pytest in Eclipse PyDev
- Overview of pytest
- Test discovery
- An xunit-style setup and teardown
- Test fixtures
- Assert statements and exceptions
- Command line arguments: pytest
- Supermarket Checkout Kata overview
- Setup and first test case
- Add items, add items prices, and calculate current total
- Add multiple items and calculate total
- Add and apply discounts
- Throw exception when adding an item with no price
- Test doubles, unittest.mock, and monkeypatch overview
- Example: unittest.mock
- TDD best practices
- Summary
Taught by
Richard Wells
Related Courses
A Practical Introduction to Test-Driven DevelopmentLearnQuest via Coursera Android App Development
Vanderbilt University via Coursera Building Interactive User Interfaces Using React Library
NIIT StackRoute via Coursera Основы разработки на C++: жёлтый пояс
Moscow Institute of Physics and Technology via Coursera Learn Intermediate Python 3
Codecademy