Skip to content

Commit 61471df

Browse files
Merge pull request #3562 from nicoddemus/revert-callinfo-result
Revert change of Callinfo.result default value
2 parents efc9a0e + 10b0b81 commit 61471df

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/_pytest/runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ def __init__(self, func, when, treat_keyboard_interrupt_as_exception=False):
194194
#: "teardown", "memocollect"
195195
self.when = when
196196
self.start = time()
197-
self.result = None
198197
try:
199198
self.result = func()
200199
except KeyboardInterrupt:

testing/test_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def test_callinfo():
473473
assert "result" in repr(ci)
474474
ci = runner.CallInfo(lambda: 0 / 0, "123")
475475
assert ci.when == "123"
476-
assert ci.result is None
476+
assert not hasattr(ci, "result")
477477
assert ci.excinfo
478478
assert "exc" in repr(ci)
479479

0 commit comments

Comments
 (0)