Special offers now — see discounted courses.
day
:
hour
:
min
:
sec
See special offers
Unit Testing and Test Driven Development in Python

Unit Testing and Test Driven Development in Python

2h 1mBeginner2018-06-27

Authors

Richard Wells

Richard Wells

Software Engineer

Course details

Every software developer wants to ship high-quality applications. Test-driven development (TDD) is a key discipline that can help you enhance your development process—and, in turn, your code base—by ensuring that crashes and bugs are addressed early on. In this course, join Richard Wells as he covers unit testing and TDD for Python projects. Richard provides an overview of both unit testing and TDD, explaining why both are crucial for developers. He also shows how to set up your development environment for TDD and goes over the pytest unit-testing framework. Throughout the course, he shares best practices and provides examples and test cases that can help you gain a practical understanding of TTD in Python.

Learning objectives
What is unit testing?
What is test-driven development (TDD)?
Setting up your development environment
Setting up pytest with Eclipse and PyCharm
Working with pytest
Assert statements and exceptions
Test doubles
TDD best practices

Skills covered

Software TestingDevOps FoundationsDevOpsPythonProgramming LanguagesOpen SourceSoftware DevelopmentOne-Off

Concepts

0. Introduction

  • 01 - Welcome

1. Overview of Test-Driven Development

  • 02 - What is unit testing
  • 03 - What is test-driven development (TDD)
  • 04 - Example TDD session - The FizzBuzz Kata

2. Setting Up a Development Environment

  • 05 - Python virtual environments
  • 06 - Set up pytest in PyCharm
  • 07 - Set up pytest in Eclipse PyDev

3. Pytest Overview

  • 08 - Overview of pytest
  • 09 - Test discovery
  • 10 - An xunit-style setup and teardown
  • 11 - Test fixtures
  • 12 - Assert statements and exceptions
  • 13 - Command line arguments - pytest

4. The Supermarket Checkout Kata

  • 14 - Supermarket Checkout Kata overview
  • 15 - Setup and first test case
  • 16 - Add items, add items prices, and calculate current total
  • 17 - Add multiple items and calculate total
  • 18 - Add and apply discounts
  • 19 - Throw exception when adding an item with no price

5. Test Doubles

  • 20 - Test doubles, unittest.mock, and monkeypatch overview
  • 21 - Example - unittest.mock

6. Test-Driven Development Best Practices

  • 22 - TDD best practices

Conclusion

  • 23 - Summary

Related courses

Related learn paths

About us

LyndaKade is a leading learning platform that helps people learn business, software, technology, and creative skills to achieve personal and professional goals.

Phone numberAparat ChannelTelegram SupportTelegram ChannelInstagram Page

All rights to this site belong to LyndaKade.

Terms of Service|Privacy Policy

نماد الکترونیک enamad در صورت اتصال با آی‌پی داخل کشور، نمایش داده خواهد شد.
logo-samandehi - لوگو ساماندهی
zarinpal
zibal