Skip to content

More exact Exception tests

Some tests check for Exception.

  1. The code should raise a more exact exception type.
  2. The test should check for that.
  3. The test should use match to check that the exact expected exception is raised.

https://docs.pytest.org/en/7.1.x/how-to/assert.html#assertions-about-expected-exceptions