Zac Hatfield-Dodds - Escape from auto-manual testing with Hypothesis! - PyCon 2019

  Рет қаралды 4,836

PyCon 2019

PyCon 2019

Күн бұрын

"Speaker: Zac Hatfield-Dodds
If we knew all of the bugs we needed to write tests for, wouldn't we just... not write the bugs? So how can testing find bugs that nobody would think of?
The answer is to have a computer write your tests for you! You declare what kind of input should work - from 'an integer' to 'matching this regex' to 'this Django model' and write a test which should always pass... then Hypothesis searches for the smallest inputs that cause an error.
If you’ve ever written tests that didn't find all your bugs, this talk is for you. We'll cover the theory of property-based testing, a worked example, and then jump into a whirlwind tour of the library: how to use, define, compose, and infer strategies for input; properties and testing tactics for your code; and how to debug your tests if everything seems to go wrong.
By the end of this talk, you'll be ready to find real bugs with Hypothesis in anything from web apps to big data pipelines to CPython itself. Be the change you want to see in your codebase - or contribute to Hypothesis itself and help drag the world kicking and screaming into a new and terrifying age of high quality software!
Slides can be found at: speakerdeck.com/pycon2019 and github.com/PyCon/2019-slides"

Пікірлер: 6
@DefWorlds
@DefWorlds 4 жыл бұрын
Please leave your politics at home.
@BobJOnes-dq1jr
@BobJOnes-dq1jr 3 жыл бұрын
That was not a political statement; it was a fact. Native Americans were forcebly removed from their lands by legislation and military action by the United States after its founding through the early 20th century . From the Library of Congress: www.loc.gov/classroom-materials/immigration/native-american/. The speaker neither condemned or endorsed these actions which would have been a political statement.
@cheeriozkitty
@cheeriozkitty 3 жыл бұрын
@@BobJOnes-dq1jr It was just kind of weird. Completely unrelated and not expounded upon. If he took a moment to make a point (which I would agree with) then I'd have no issue. I think he was trying to tell a joke and it fell flat.
@rje4242
@rje4242 3 жыл бұрын
@@BobJOnes-dq1jr I blame the Romans for what they did to the native peoples of Europe and Judea.
@GibusWearingMann
@GibusWearingMann 2 жыл бұрын
@@mikaelmorrell-stinson8731 Please leave your politics at home.
@robertsmith-williams5255
@robertsmith-williams5255 18 күн бұрын
@DefWorlds you're so sensitive, have you thought about that? Were you triggered?
Jes Ford - Getting Started Testing in Data Science - PyCon 2019
31:01
3 wheeler new bike fitting
00:19
Ruhul Shorts
Рет қаралды 50 МЛН
Climbing to 18M Subscribers 🎉
00:32
Matt Larose
Рет қаралды 36 МЛН
The Only Unbreakable Law
53:25
Molly Rocket
Рет қаралды 317 М.