...

/

Advanced pytest Features

Advanced pytest Features

Learn two more tricks that you can use in pytest: tests that are expected to fail and log capturing.

We'll cover the following...

Overview

The pytest library is powerful, and we won’t be able to describe all its features here. However, we can still dive into a few to show them as some bait.

Check for exceptions

A common pattern is checking for exceptions—that’s one of the ways to check not only the optimistic scenario (positive tests) but also expected failures. The pytest library makes it smooth ...

Access this course and 1400+ top-rated courses and projects.