Make rule PT012 example clearer (#10248)

This commit is contained in:
Eero Vaher 2024-03-06 16:47:14 +01:00 committed by GitHub
parent 6159a8e532
commit cbd927f346
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,8 +26,8 @@ use super::helpers::is_empty_or_null_string;
///
/// def test_foo():
/// with pytest.raises(MyError):
/// setup() # may raise `MyError`
/// func_to_test()
/// setup()
/// func_to_test() # not executed if `setup()` raises `MyError`
/// assert foo() # not executed
/// ```
///
@ -38,7 +38,7 @@ use super::helpers::is_empty_or_null_string;
///
/// def test_foo():
/// setup()
/// with pytest.raises(MyException):
/// with pytest.raises(MyError):
/// func_to_test()
/// assert foo()
/// ```