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

Pubblicato il: 22 agosto 2023
sul canale di: 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 🙏


In questa pagina del sito puoi guardare il video online A Practical and Short Intro to TDD (Test Driven Development) Using Python della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Pybites 22 agosto 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 4,691 volte e gli è piaciuto 135 spettatori. Buona visione!