07:31100% CODE COVERAGE - Think You're Done? Think AGAIN.☝
From the creator
💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. This video explains the basics of unit testing, test-driven development, and code coverage in Python. The "holy grail" of unit testing is to reach 100% code coverage. However, code coverage is not a perfect metric, as you'll see in this video. I'll go through an example in Python showing you how to add unit tests, interpret coverage reports, and how the process of test-driven development works. And then I'll end the video with covering two mistakes I've seen developers make when writing unit tests and interpreting their coverage reports. You can find the code I worked on in this episode in my GitHub repository: https://github.com/arjancodes/betterpython 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses/ 🔖 Chapters: 0:00 Intro 1:56 Explaining the example 3:50 Setup unit testing 6:10 Add unit tests for compute_tax 10:43 Write unit tests for can_lease (TDD) 13:06 Write can_lease implementation 14:06 Solving the bug in compute_tax 15:50 Mistakes to avoid 17:41 Final thoughts 18:32 Outro
Published 2021-02-26 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





