February 2022
Intermediate to advanced
274 pages
6h 28m
English
We’re going to wrap up this book by swinging back to parametrization and look at some advanced techniques. In Chapter 5, Parametrization, we looked at parametrizing tests and fixtures, and you learned how to implement parametrized testing with the hook function, pytest_generate_tests(). However, we left the chapter with some pretty simple parametrizations of a test using one parameter with string values. We’re going to do so much more in this chapter.
In this chapter we’ll look at:
Using data structures or objects as values. That complicates the test case identifier slightly, but we’ll use custom identifiers to make the test node IDs readable.
Using dynamic values. We’ll use a function to dynamically generate ...
Read now
Unlock full access