Hypothesis is an awesome Python package for property-based testing. In this video I talk about what property-based testing is, and show you a practical example of how to use it to make writing software tests in Python a breeze.
The code I worked on in this episode is available here: github.com/ArjanCodes/2022-hy....
💡 Get my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.
💻 ArjanCodes Blog: www.arjancodes.com/blog
🎓 Courses:
The Software Designer Mindset: www.arjancodes.com/mindset
The Software Designer Mindset Team Packages: www.arjancodes.com/sas
The Software Architect Mindset: Pre-register now! www.arjancodes.com/architect
Next Level Python: Become a Python Expert: www.arjancodes.com/next-level...
The 30-Day Design Challenge: www.arjancodes.com/30ddc
🛒 GEAR & RECOMMENDED BOOKS: kit.co/arjancodes.
👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!
💬 Discord: discord.arjan.codes
🐦Twitter: / arjancodes
🌍LinkedIn: / arjancodes
🕵Facebook: / arjancodes
👀 Code reviewers:
- Yoriz
- Ryan Laursen
- James Dooley
- Dale Hagglund
🎥 Video edited by Mark Bacskai: / bacskaimark
🔖 Chapters:
0:00 Intro
1:11 About unit tests
1:44 What is property-based testing
3:09 A basic example of property-based test
5:28 Controlling what example data is generated
6:22 Adding a second property based test
7:29 A more complex example
10:15 Adding a test for negative team sizes
11:43 Adding more property-based tests
13:46 Creating a custom strategy
16:07 Using the custom strategy
16:54 A few more examples of using strategies
18:40 Generating testing code automatically
19:44 Final thoughts
#arjancodes #softwaredesign #python
DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!
Негізгі бет Property-Based Testing In Python: Hypothesis is AWESOME
Пікірлер: 94