diff --git a/src/_pytest/python_api.py b/src/_pytest/python_api.py index 26f78c66a..cb72fde1e 100644 --- a/src/_pytest/python_api.py +++ b/src/_pytest/python_api.py @@ -101,6 +101,7 @@ class ApproxBase: ) def __bool__(self): + __tracebackhide__ = True raise AssertionError( "approx() is not supported in a boolean context.\nDid you mean: `assert a == approx(b)`?" )