Skip to content

pytest 3.0.0 captures all or nothing #375

Open
@fenchu

Description

@fenchu

With pytest 2.1.1 I could finegrain my logs and only capture stdout etc. But when I upgraded to v3.0.0 there was "No log output captured." allover, and I'm only able switch between all or nothing the -s and --capture settings:

-s --capture=sys
 ------------------------------Captured stderr call------------------------------ 
20201120142916.606|INFO|/builds/id-pro/access/access-scim-test/tests/test_03_scim_insert.py:53|lookup 100 users took 6.34sec
20201120142916.607|INFO|/builds/id-pro/access/access-scim-test/tests/test_03_scim_insert.py:55|users already preregistered on username:[]
20201120142926.660|INFO|/builds/id-pro/access/access-scim-test/tests/test_03_scim_insert.py:79|insert 100 users took 10.02sec

 -------------------------------Captured log call-------------------------------- 
20201120142916|INFO|lookup 100 users took 6.34sec
20201120142916|INFO|users already preregistered on username:[]
20201120142926|INFO|insert 100 users took 10.02sec

How can I finegrain this in the new version, or is the a way I can hack this in a fixture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThis PR is asking whether it is possible to achieve a certain outcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions