diff --git a/src/_pytest/assertion/__init__.py b/src/_pytest/assertion/__init__.py index 53b33fe38..126929b6a 100644 --- a/src/_pytest/assertion/__init__.py +++ b/src/_pytest/assertion/__init__.py @@ -26,7 +26,7 @@ def pytest_addoption(parser): parser.addini( "enable_assertion_pass_hook", type="bool", - default="False", + default=False, help="Enables the pytest_assertion_pass hook." "Make sure to delete any previously generated pyc cache files.", ) diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index 0c01be28c..5c6809279 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -1335,6 +1335,10 @@ class TestEarlyRewriteBailout: class TestAssertionPass: + def test_option_default(self, testdir): + config = testdir.parseconfig() + assert config.getini("enable_assertion_pass_hook") is False + def test_hook_call(self, testdir): testdir.makeconftest( """