Skip to content

pytrace=False and "--tb=line" reports "None" #10831

@ikonst

Description

@ikonst

Given test changed as

 import pytest

 def test_foo():
-    pytest.fail('my message')
+    pytest.fail('my message', pytrace=False) 

and invoked as

pytest --tb=line test_foo.py

results in output

 == FAILURES ==
-.../test_foo.py:4: Failed: my message
+None

Expected: Output remains the same

== FAILURES ==
.../test_foo.py:4: Failed: my message

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: tracebacksrelated to displaying and handling of tracebackstype: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions