This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
What is one useful feature of adding fixtures to the conftest.py file?
It allows importing those fixtures in a test suite.
It allows sharing the fixtures without importing them in a test suite.
Because it allows fixtures to require pytest fixtures.
What makes a test a good candidate for parametrize()?
parametrize()
When a test needs to loop over inputs for the same assertion.
When a test needs to catch multiple exceptions.
When a test needs to run in parallel.
Why might multiple arguments with parametrize not be a good idea?
Because pytest doesn't allow it. An exception gets raised instead.
Because test functions don't allow multiple arguments.
Because it can make tests harder to read.
You must answer all questions before checking your work.
Was this page helpful?