11:09Property-Based Testing In Python: Hypothesis is AWESOME
From the creator
💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. 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: https://github.com/ArjanCodes/2022-hypothesis. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses/ 🔖 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
Published 2022-06-24 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.
![[See Description] Achieving Targets and Shorting - Python for Finance with Zipline and Quantopian 8](https://i.ytimg.com/vi/vkD4iKpXYbk/hqdefault.jpg)
![[See Description] Strategy Sell Logic with Schedule Function with Quantopian - Python for Finance 6](https://i.ytimg.com/vi/tWDcFZzj_CM/hqdefault.jpg)
![[See Description] Stop-Loss in strategy - Python for Finance with Quantopian and Zipline 7](https://i.ytimg.com/vi/t2VXXDMZ22w/hqdefault.jpg)
![[See Description] Back-testing our strategy - Programming for Finance with Python - part 5](https://i.ytimg.com/vi/swTmU86wYIc/hqdefault.jpg)

