Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can Python nosetests (version 1.1.2) be set to show logging output?

I have a set of unit tests that all feature logging output at various logging levels. When I run these unit tests individually or via a shell script, all logging is shown. When I run these unit tests using nosetests of Python nose, I don't see the logging output. How can I show the logging?

The version of nose I am using is 1.1.2 (and I cannot change this):

-bash-4.1$ pip freeze | grep nose 
nose==1.1.2

Currently, I am running nosetests using a command like the following:

nosetests --verbosity=2 *.py

When I try to use the option --logging-level=INFO, I run into difficulty:

Usage: nosetests [options]

nosetests: error: no such option: --logging-level
like image 470
d3pd Avatar asked Jul 08 '14 22:07

d3pd


1 Answers

You are asking about a feature added in 1.2.0 and saying that you cannot upgrade.

So unless you are into patching your obsolete version by backporting this feature, the answer is find a way to upgrade.

like image 184
sorin Avatar answered Oct 28 '22 11:10

sorin