Revert change of Callinfo.result default value
As discussed in #3560, this should not go to master because this breaks the API. Reverts commits:1a7dcd73cf
198e993969
This commit is contained in:
parent
80f8a3ad7c
commit
10b0b81346
|
@ -1 +0,0 @@
|
||||||
Allow ``CallInfo`` to have an unfinished state represented by having a ``None`` value in the ``result`` attribute.
|
|
|
@ -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