diff --git a/tests/test_common.py b/tests/test_common.py index 3d6e85b..685b564 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -54,9 +54,9 @@ def is_negative(val): assert env.int("AN_INTEGER", validate=is_positive) == 982 assert env.int("AN_INTEGER", validate=(is_positive, is_positive)) == 982 - with pytest.raises(Exception): + with pytest.raises(Exception, match="AN_INTEGER"): env.int("AN_INTEGER", validate=is_negative) - with pytest.raises(Exception): + with pytest.raises(Exception, match="AN_INTEGER"): env.int("AN_INTEGER", validate=(is_positive, is_negative))