Talk: Harry Percival - Stop Using Mocks (for a while)

  Рет қаралды 14,231

PyCon US

PyCon US

Күн бұрын

Пікірлер: 8
@jonathanfmach2
@jonathanfmach2 2 жыл бұрын
Brilliant talk!
@marco_gorelli
@marco_gorelli 4 жыл бұрын
OK, you've convinced me
@harry__init__
@harry__init__ 4 жыл бұрын
let me know how it goes!
@harry__init__
@harry__init__ 4 жыл бұрын
some prior art: Ed Jung (tech reviewer for our book) on mocking + patching pitfalls from pycon last year: kzbin.info/www/bejne/gpXPq2eMYrp2fNk Yeray Diaz on dependency injection: "import as an antipattern" kzbin.info/www/bejne/p5yqqaxqmJtngMk Brandon Rhodes: "hoist your I/O" which is actually a radically different way of doing it, but it has the same objective of decoupling infra from business logic: kzbin.info/www/bejne/hnO0f2lopLqhhJo
@ailuros_
@ailuros_ 2 жыл бұрын
thanks!
@manicdee983
@manicdee983 4 жыл бұрын
Sometimes the enterprisey-java-y stuff is actually useful :D You have teams of lazy programmers trying to manage separation of concerns (laziness, hubris and impatience being the three noble virtues). Also if you make the API a class, you can inject the dependency during startup or setup, so it doesn't pollute your API calls in the individual tests. Faking the entire 3rd party API becomes easier if your third party uses something like Swagger or OpenAPI. Failing that building the fake means you are deliberately learning how the third party API *actually* works instead of how it's *documented* to work, which is incredibly important. Then you can start doing things like adding assertions into your real API to check that the real API works the way you expected it to, with the error messages pointing out where your understanding is not in tune with reality. I'll certainly be checking out your book, though I don't think you mentioned it during the presentation.
Talk: Aly Sivji - If Statements are a Code Smell
30:38
PyCon US
Рет қаралды 13 М.
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН
I'VE MADE A CUTE FLYING LOLLIPOP FOR MY KID #SHORTS
0:48
A Plus School
Рет қаралды 20 МЛН
Thoughts About Unit Testing | Prime Reacts
11:21
ThePrimeTime
Рет қаралды 238 М.
Lisa Roach - Demystifying the Patch Function   - PyCon 2018
37:07
PyCon 2018
Рет қаралды 46 М.
Talk: Conor Hoekstra - Beautiful Python Refactoring
30:05
PyCon US
Рет қаралды 24 М.
Talk: Anthony Shaw - Why is Python slow?
32:52
PyCon US
Рет қаралды 21 М.
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН