PyTest - Writing Assertions
You want to test a function that may raise either
DeprecationWarning or UserWarning. How can you assert that exactly one warning of either type is raised during the test?