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

Veröffentlicht am: 22 August 2023
auf dem Kanal: Pybites
4,691
135

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
07:44 Testing the exception string with pytest.raises(ValueError, match=...)
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?

---
Learn more about Pybites / what we do: https://pybit.es

Get our weekly developer / mindset emails: https://pybit.es/friends/

Join our Slack community: https://pybit.es/community/

And last but not least, we appreciate any feedback to make our YouTube content better 💡
https://form.jotform.com/230941798741062 🙏


Auf dieser Seite können Sie das Online-Video A Practical and Short Intro to TDD (Test Driven Development) Using Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Pybites 22 August 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 4,691 Mal angesehen und es wurde von 135 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!