Skip to content

logging not captured with pytest 3.3 and xdist #256

Closed
@nicoddemus

Description

@nicoddemus

Consider this file:

import logging
logger = logging.getLogger(__name__)

def test():
	logger.warn('Some warning')

When executing pytest foo.py -n2, the warning is printed to the console:

============================= test session starts =============================
platform win32 -- Python 3.5.0, pytest-3.3.1, py-1.5.2, pluggy-0.6.0
rootdir: C:\Users\bruno, inifile:
plugins: xdist-1.20.1, forked-0.2
gw0 [1] / gw1 [1]
scheduling tests via LoadScheduling
foo.py                       6 WARNING  Some warning
.                                                                        [100%]
========================== 1 passed in 0.65 seconds ===========================

Executing pytest normally without the -n2 flags then the message is not printed.

Using pytest 3.3.1 and xdist 1.20.1.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions