Black formatting.

This commit is contained in:
Victor Maryama 2019-06-26 17:08:35 +02:00
parent d638da5821
commit f755ff6af1
2 changed files with 15 additions and 8 deletions

View File

@ -605,7 +605,9 @@ class AssertionRewriter(ast.NodeVisitor):
self.module_path = module_path
self.config = config
if config is not None:
self.enable_assertion_pass_hook = config.getini("enable_assertion_pass_hook")
self.enable_assertion_pass_hook = config.getini(
"enable_assertion_pass_hook"
)
else:
self.enable_assertion_pass_hook = False

View File

@ -1308,7 +1308,6 @@ class TestEarlyRewriteBailout:
class TestAssertionPass:
def test_hook_call(self, testdir):
testdir.makeconftest(
"""
@ -1317,10 +1316,12 @@ class TestAssertionPass:
"""
)
testdir.makeini("""
testdir.makeini(
"""
[pytest]
enable_assertion_pass_hook = True
""")
"""
)
testdir.makepyfile(
"""
@ -1349,10 +1350,12 @@ class TestAssertionPass:
_pytest.assertion.rewrite, "_call_assertion_pass", raise_on_assertionpass
)
testdir.makeini("""
testdir.makeini(
"""
[pytest]
enable_assertion_pass_hook = True
""")
"""
)
testdir.makepyfile(
"""
@ -1386,10 +1389,12 @@ class TestAssertionPass:
"""
)
testdir.makeini("""
testdir.makeini(
"""
[pytest]
enable_assertion_pass_hook = False
""")
"""
)
testdir.makepyfile(
"""