Getting started with pytest Transcripts
Chapter: Configuration
Lecture: Using pyproject.toml, tox.ini, or setup.cfg

Login or purchase this course to watch this video and the rest of the course contents.
0:00 So let's take a look at what these settings would look like in alternate forms. So I've got a directory set up with the alternate chapter seven,
0:11 alt and I just have the there's a tox.ini setup.cfg, and a pyproject.toml. so if I wanted to, if I've already using pyproject.toml.
0:21 Oh, so maybe I'm using black or maybe I'm using uh just a flet or something with the pyproject.toml already and I just wanted to put my pytest
0:29 settings there. Let's actually just load all these up so that we can have have them here and I'll stick this side by side split right?
0:40 That's what I wanted. So the pytest any is similar to pyproject.toml but in toml I have to specify a different top level thing.
0:49 I need to say tool.pytest any options and then addopts is listed the same but I've got to put them in strings and the lists of things need to
1:01 be actual like lists with strings. It's toml syntax which is different than any syntax but this is what this looks like The setup.cfg.
1:13 I'll pull this one over as well. Setup.cfg. It looks very similar. The difference really is that I need to say tool.pytest
1:22 up at the top tox.ini tox.ini is also in any file so it's gonna look identical. It's just that will include a pytest section within the tox section and
1:32 you'll most undoubtedly have a tox section or else why would you have a tox.ini file? But you could just leave it as is.

Talk Python's Mastodon Michael Kennedy's Mastodon