Skip to content

pytest shows 0% test statistics after 3.4.0 with --capture argument #3203

@skirpichev

Description

@skirpichev

$ cat test_a.py 
def test_1():
    pass
def test_2():
    pass
$ cat test_b.py 
def test_1():
    pass
def test_2():
    pass

Before 3.4.0 I get:

$ py.test --capture=no test_*
============================= test session starts ==============================
platform linux -- Python 3.5.3, pytest-3.3.2, py-1.5.2, pluggy-0.6.0
rootdir: /home/sk/test, inifile:
plugins: cov-2.4.0
collected 4 items                                                              

test_a.py ..                                                             [ 50%]
test_b.py ..                                                             [100%]

=========================== 4 passed in 0.04 seconds ===========================

But since last release:

$ py.test --capture=no test_*
============================= test session starts ==============================
platform linux -- Python 3.5.3, pytest-3.4.0, py-1.5.2, pluggy-0.6.0
rootdir: /home/sk/test, inifile:
plugins: cov-2.4.0
collected 4 items                                                              

test_a.py ..                                                             [  0%]
test_b.py ..

=========================== 4 passed in 0.04 seconds ===========================

Metadata

Metadata

Assignees

Labels

topic: reportingrelated to terminal output and user-facing messages and errorstype: 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