Getting started with pytest Transcripts
Chapter: pytest Fixtures
Lecture: Review

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Let's review everything we were hoping to cover in this chapter to make sure we got through it. So fixture for set up and tear down.
0:07 Yes, we did that with setting up a database, we did that with with the cards_db, and fixtures for data actually the cards_db returns data too.
0:17 But we also showed even with that last example of foo bar and baz how you can just return data with a fixture using multiple fixtures.
0:25 Yeah, we just covered that built in fixtures we quickly looked at the list we didn't, we covered tmp path factory.
0:35 That's a mouthful but please check those out and with new releases of pytest,
0:41 sometimes they add more of those so it's always worth checking out what the built in ones were there, looked at scope,
0:46 function module and session scope and hopefully that is sort of understandable for you and then
0:53 sharing fixtures between test files with definitely covered that And we also covered
0:59 some new flags that I wanted to highlight to make sure that you didn't forget we've got a -s to turn off output capture.
1:06 You can also use a --capture personnel to do the same thing. We used setup, show to trace,
1:13 fixture execution very handy to help understand what's going on and then --fixtures
1:20 to show what the available fixtures are and show you where they're defined so if you can't, if you forgot where a fixture is,
1:27 you can use fixtures to figure out where that is next chapter. We're going to take a look at parameterization,
1:34 which is another really cool feature of pytest, and I know you're gonna love it.

Talk Python's Mastodon Michael Kennedy's Mastodon