Skip to content

Python TDD

About

  • Level: Intermediate to Advanced
  • Lectures: 30 hours
  • Self-study: 15 hours
  • Exercises: 24
  • Lines of Code to write: ~500
  • Format: e-learning + weekly online teleconference with instructor
  • Language: English or Polish

Description

This hands-on course teaches Test-Driven Development (TDD) for Python by following the syllabus's practical modules on test types, test-first development, mocking strategies, mutation testing, and testing asynchronous applications. Learners practice with popular frameworks (unittest, pytest, doctest, behave), run and debug tests in IDEs and the command line, and complete an iterative TDD project that drives design through tests, includes team-based code review, and demonstrates refactoring techniques in real scenarios.

Advantages

Participants will shorten feedback loops and catch regressions earlier by adopting test-first workflows, leading to cleaner APIs and more maintainable code. The course covers practical patterns for testing floating-point and pseudorandom behaviour, writing reliable asynchronous tests, introducing tests into legacy code, and integrating test suites with CI pipelines — skills that increase confidence when refactoring and deploying to production.

Target Audience

  • Software developers and engineers who want to adopt TDD and improve code quality through automated tests.
  • QA engineers and test automation authors who design unit, integration, and system tests and want practical, framework-driven approaches.
  • Team leads and architects who need repeatable testing and review practices to maintain code health and reduce regressions.
  • Developers working with asynchronous code who want reliable testing patterns for coroutines, tasks, and async I/O.
  • Engineers maintaining legacy codebases who need strategies for safely introducing tests and performing refactorings.
  • Advanced students and learners aiming to master professional testing workflows and TDD-driven design.

Format

The course is delivered as a blended learning experience, comprising numerous short videos that progressively introduce concepts and techniques through a series of practical examples. The course format combines e-learning modules with weekly online teleconferences with the instructor for Q&A, discussions, and code reviews.

During the self-study phase, students complete practical exercises that apply the learned techniques. Each exercise is designed to have 100% test coverage, allowing students to verify their solutions. Additionally, students will have access to a spreadsheet to track their progress.

Students will also receive downloadable resources, including code samples, exercise templates, and reference materials to support their learning journey. Since 2015, we have refined our materials based on student feedback to ensure clarity, engagement, and practical relevance. All code listings undergo automatic testing (over 28,000 tests) to ensure accuracy and reliability. All materials, code listings, exercises, and assignments are handcrafted by our trainers without the use of AI. All case studies and examples are based on real-world scenarios drawn from our extensive experience in software engineering.

Working language of the course is either English or Polish.

Course Outline

  1. Types of tests with examples:

    • Unit tests
    • Smoke tests
    • Static analysis
    • Mutation testing
    • Regression tests
    • Functional tests
    • Interface tests
    • Load tests
    • Integration tests
    • Security tests
  2. Test-Driven Development:

    • Test-first vs. test-last development
    • Mock vs. Stub
    • Floating-point precision issues (IEEE-754)
    • Testing pseudorandom values and the concept of random seed
    • Testing frameworks: unittest, doctest, pytest, behave
    • Running tests in an IDE (PyCharm) and from the command line
    • TDD demonstration
  3. Independent TDD project (several iterations):

    • TDD demonstration
    • Code review techniques and team-based code evaluation
    • Refactoring options in the IDE (PyCharm)
    • Testing asynchronous applications
  4. Refactoring:

    • Rename
    • Extract Method
    • Extract Superclass
    • Inline
    • Introduce Variable
    • Introduce Constant
    • Introduce Field
    • Introduce Parameter
    • Pull Members Up
    • Push Members Down

Our Experience

AATC trainers have been teaching software engineering since 2015. We have already delivered over 11,000 (eleven thousand) hours of software engineering training to more than 32,000 (thirty-two thousand) students worldwide.

Requirements

  • Intermediate knowledge of Python programming
  • Familiarity with using an IDE (e.g., PyCharm, VSCode)
  • Familiarity with using version control systems (e.g., Git)
  • Understanding of AI-assisted coding tools (e.g., GitHub Copilot, ChatGPT)

Setup

  • Newest version of Python
  • IDE of your choice (e.g., PyCharm, VSCode)
  • Git installed and configured
  • GitHub account
  • Web browser (e.g., Chrome, Firefox, Safari, etc.)

Apply

If you are interested in taking this course, please contact us at info@astronaut.center