Skip to content

Commit 35ede04

Browse files
Anusha ShekharAnusha Shekhar
authored andcommitted
Codecov
1 parent cb4bb02 commit 35ede04

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

testing/test_hookcaller.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ def hello(self, arg: object) -> None:
410410

411411
pm.add_hookspecs(Api)
412412

413-
# make sure a bad signature still raises an error when using specname
413+
"""make sure a bad signature still raises an error when using specname"""
414+
414415
class Plugin:
415416
@hookimpl(specname="hello")
416417
def foo(self, arg: int, too, many, args) -> int:
@@ -419,8 +420,9 @@ def foo(self, arg: int, too, many, args) -> int:
419420
with pytest.raises(PluginValidationError):
420421
pm.register(Plugin())
421422

422-
# make sure check_pending still fails if specname doesn't have a
423-
# corresponding spec. EVEN if the function name matches one.
423+
"""make sure check_pending still fails if specname doesn't have a
424+
corresponding spec. EVEN if the function name matches one."""
425+
424426
class Plugin2:
425427
@hookimpl(specname="bar")
426428
def hello(self, arg: int) -> int:
@@ -456,9 +458,9 @@ def test_hookcaller_repr_with_saferepr_failure(
456458
) -> None:
457459
@addmeth()
458460
def he_method2() -> None:
459-
# Intentional error to make the repr fail
461+
"""Intentional error to make the repr fail"""
460462
raise ValueError("Intentional error in he_method2")
461463

462-
# Verify that HookCaller.repr with saferepr still works despite the error
464+
"""Verify that HookCaller.repr with saferepr still works despite the error"""
463465
expected_repr = f"<HookCaller {saferepr(hc.name)}>"
464466
assert repr(hc) == expected_repr

testing/test_tracer.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,6 @@ def test_saferepr_broken_getattribute():
243243
"""
244244

245245
class SomeClass:
246-
def __getattribute__(self, attr):
247-
raise RuntimeError
248-
249246
def __repr__(self):
250247
raise RuntimeError
251248

0 commit comments

Comments
 (0)