All challenges
Multiple ChoiceIntermediate 30s

pytest.raises

Choose the best answer for: checking exceptions
Options
  1. 1pytest.raises suppresses exceptions raised by the block
  2. 2pytest.raises returns the exception message as a string
  3. 3pytest.raises(Exc) context manager checks for exception
  4. 4pytest.raises is a decorator instead of a context manager

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle