Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

pytest -v -s script.py not showing any log #2

Closed
horta opened this issue Jul 28, 2016 · 5 comments
Closed

pytest -v -s script.py not showing any log #2

horta opened this issue Jul 28, 2016 · 5 comments

Comments

@horta
Copy link

horta commented Jul 28, 2016

py.test -v -s limix_qep/test/test_bernoulli.py

========================================================================= test session starts ==========================================================================
platform darwin -- Python 2.7.12, pytest-2.9.2, py-1.4.31, pluggy-0.3.1 -- /Users/horta/anaconda2/bin/python
cachedir: .cache
rootdir: /Users/horta/workspace/limix-qep, inifile:
plugins: logging-2015.11.4
collected 3 items

limix_qep/test/test_bernoulli.py::test_bernoulli_lml PASSED
limix_qep/test/test_bernoulli.py::test_bernoulli_optimize PASSED
limix_qep/test/test_bernoulli.py::test_bernoulli_prediction PASSED

======================================================================= 3 passed in 6.15 seconds =======================================================================

Isn't it supposed to show all messages that I have sent from doing:

import logging
self._logger = logging.getLogger(__name__)
self._logger.debug("Hello mom!")

Note: the above code are inside the files that contains the tests but actually inside the files of the package that is being tested. Not sure if that matters. I'm kind of confused o.o

@s0undt3ch
Copy link
Contributor

Try passing additional -v since you are logging at the debug level.

Also note that this plugin is going to be merged into pytest-catchlog. See #1, eisensheng/pytest-catchlog#20 and eisensheng/pytest-catchlog#33

@horta
Copy link
Author

horta commented Jul 28, 2016

But I'm already passing -v.

@s0undt3ch
Copy link
Contributor

Yes, I saw, but you need to lower the log level by increasing verbosity, -vv, -vvv, -vvv, etc...

@horta
Copy link
Author

horta commented Jul 28, 2016

Ops. Thanks a lot!! =) It works now.

@horta horta closed this as completed Jul 28, 2016
@s0undt3ch
Copy link
Contributor

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants