mdmintz / pynose

pynose fixes nose to extend unittest and make testing easier
https://pypi.org/project/pynose/
GNU Lesser General Public License v2.1
11 stars 6 forks source link

Add options for capturing output #12

Closed mdmintz closed 1 year ago

mdmintz commented 1 year ago

Add options for capturing output

To enable capture, set a Python env variable called "NOSE_CAPTURE" to "1".

It can be done like this in an __init__.py file:

import os
os.environ["NOSE_CAPTURE"] = "1"

This restores the default setting of nose, which is capturing output. (Note that if output is captured, print() calls won't be seen.)

Capturing output can also be enabled with: --capture-output.