diff --git a/changelog/3554.bugfix b/changelog/3554.bugfix deleted file mode 100644 index 4a10d71ee..000000000 --- a/changelog/3554.bugfix +++ /dev/null @@ -1 +0,0 @@ -Allow ``CallInfo`` to have an unfinished state represented by having a ``None`` value in the ``result`` attribute. diff --git a/src/_pytest/runner.py b/src/_pytest/runner.py index b8ba70fa0..ef1a0e694 100644 --- a/src/_pytest/runner.py +++ b/src/_pytest/runner.py @@ -194,7 +194,6 @@ class CallInfo(object): #: "teardown", "memocollect" self.when = when self.start = time() - self.result = None try: self.result = func() except KeyboardInterrupt: diff --git a/testing/test_runner.py b/testing/test_runner.py index 9085dbe9a..26493de6e 100644 --- a/testing/test_runner.py +++ b/testing/test_runner.py @@ -473,7 +473,7 @@ def test_callinfo(): assert "result" in repr(ci) ci = runner.CallInfo(lambda: 0 / 0, "123") assert ci.when == "123" - assert ci.result is None + assert not hasattr(ci, "result") assert ci.excinfo assert "exc" in repr(ci)