Simplify Your Tests with Fixtures

preview_player
Показать описание
Fixtures can make your tests simpler and easier to maintain by using or creating common abstractions to be shared amongst your tests. We look at what problems fixtures solve and how they can be used to make your testing life easier.

Intended audience: People already familiar with #pytest and testing but no or only a little experience with #fixtures.

Content:
0:00 - Intro
07:03 - Examples and explanation in a notebook
12:40 - First fixture example in code
13:55 - Discuss mechanics using tmppath fixture
20:30 - Use fixtures to manipulate paths in settings
23:50 - Use pytest argument to show fixtures in use
26:50 - Use PyCharm to move around fixtures
29:32 - Custom fixture
30:21 - Monkeypatching
33:26 - Fixture dependencies and usefixtures
36:20 - How are fixtures looked up?
43:16 - Fixture gotchas
52:15 - Fixture scopes
55:30 - Parametrizing fixtures
56:50 - Parametrizing tests

Links:
Join us:

About the Presenter:

Category: webinar
Рекомендации по теме
Комментарии
Автор

Starting around 48:00 or 49:00, the teacher - covering "gotchas" - comes to EXACTLY the problem I just had, and the very reason I am sitting through this tutorial. AND THEN PAUL TRIES TO HURRY HIM UP AND MOVE HIM OFF OF IT TO SOMETHING ELSE. Great way to be concerned about helping your customers, Paul. You seem more interested in hiding the warts than really teaching us anything valuable.

malikrumi
Автор

The sound quality could be better. It's pretty 70'ish :\

this-is-bioman
Автор

I recommend having a look at how CakePHP deals with fixtures using factories:


pabloinberlin
Автор

Спасибо за видео) и дайте, пожалуйста, русские

hopezahar