A Practical and Short Intro to TDD (Test Driven Development) Using Python

preview_player
Показать описание
Step into Test Driven Development with Python in this concise introduction 💡

We'll walk you through the benefits of TDD, set up a simple example, and demonstrate how to iteratively build and refine a Car class with a property.

Whether you're new to TDD or just want a quick refresher, this video has you covered 😎 💪

Chapters:
00:00 Introduction to TDD (Test Driven Development)
00:09 Explanation of TDD
00:23 Advantages and main takeaways
01:01 Setting Up an example
01:33 Writing a first test function to construct a car instance
02:48 Building the Car class (passing the test)
03:46 Refactoring the Car constructor to take no argument
04:40 Refactor to use a property (read-only attribute)
05:10 Writing a second test function to set the car's speed
05:38 Implementing the property setter for this
06:25 Writing a third test to disallow negative speeds
07:12 Implementing the validation code for this
08:32 Refactor duplicated car instance creation into a pytest fixture
09:32 Wrap up / summary of what we've done and learned
10:15 Do you want a more advanced example?

---

And last but not least, we appreciate any feedback to make our YouTube content better 💡
Рекомендации по теме
Комментарии
Автор

I very much find your videos very intuitive and helpful. Thanks for doing them. As suggested I would be happy if you could do a similiar video which shows TDD in the scope of Django.

andreasfloter