Getting started with pytest Transcripts
Chapter: pytest Fixtures
Lecture: Introducing test fixtures

Login or purchase this course to watch this video and the rest of the course contents.
0:01 Welcome to Chapter Three All About Pytest, Test fixtures, Test fixtures are one of the amazing features of pytest and they can really,
0:10 really helpful to your test strategies, fixtures are incredibly powerful and important.
0:16 Yes, they can be difficult to get at first and it's really gonna be hard to think about them until we start looking at some code,
0:24 we're going to go through several examples just to kind of let you see fixtures a few times. It'll help with the learning process.
0:33 So fixtures can be helpful for set up and tear down, there are a way to take the set up and tear down code of a test
0:39 and pull it out of the test into the fixture function, fixture functions can also be used for test data because there they have the ability to
0:48 pass information to the test. We can use multiple fixtures, protests and you can combine them in some cool ways.
0:56 There are built in fixtures built into the pytests that are really powerful,
1:01 we'll look at a couple of those and there's several scopes and now scoped isn't gonna
1:07 make much sense without, until we start talking about fixtures and start seeing some examples
1:12 fixtures can also be shared between test files by using a conftest.py file and it will use in example and show that in this chapter.


Talk Python's Mastodon Michael Kennedy's Mastodon