Skip to content

logging not captured with pytest 3.3 and xdist #256

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
nicoddemus opened this issue Dec 6, 2017 · 1 comment
Closed

logging not captured with pytest 3.3 and xdist #256

nicoddemus opened this issue Dec 6, 2017 · 1 comment
Assignees
Labels

Comments

@nicoddemus
Copy link
Member

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.

@nicoddemus
Copy link
Member Author

Closed in favor of pytest-dev/pytest#3009

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant