Merge pull request #3562 from nicoddemus/revert-callinfo-result
Revert change of Callinfo.result default value
This commit is contained in:
commit
61471df8da
|
@ -194,7 +194,6 @@ class CallInfo(object):
|
||||||
#: "teardown", "memocollect"
|
#: "teardown", "memocollect"
|
||||||
self.when = when
|
self.when = when
|
||||||
self.start = time()
|
self.start = time()
|
||||||
self.result = None
|
|
||||||
try:
|
try:
|
||||||
self.result = func()
|
self.result = func()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|
|
@ -473,7 +473,7 @@ def test_callinfo():
|
||||||
assert "result" in repr(ci)
|
assert "result" in repr(ci)
|
||||||
ci = runner.CallInfo(lambda: 0 / 0, "123")
|
ci = runner.CallInfo(lambda: 0 / 0, "123")
|
||||||
assert ci.when == "123"
|
assert ci.when == "123"
|
||||||
assert ci.result is None
|
assert not hasattr(ci, "result")
|
||||||
assert ci.excinfo
|
assert ci.excinfo
|
||||||
assert "exc" in repr(ci)
|
assert "exc" in repr(ci)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue