Pytest memeriksa pengecualian

# Check that my_statement(myarg) raises ValueError
import pytest

def test_testname():
    with pytest.raises(ValueError):
        my_statement(myarg)
Ahh the negotiatior