Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Allow to inject warning filters during ``nosetest``.

Project description

Put the same arguments as warnings.filterwarnings in setup.cfg at the root of your project. Separated each argument by pipes |, one filter per line. Whitespace are stripped.

for example:

warningfilters=default         |.*            |DeprecationWarning |notebook.*
               ignore          |.*metadata.*  |DeprecationWarning |notebook.*
               once            |.*schema.*    |UserWarning        |nbfor.*
               error           |.*warn.*      |DeprecationWarning |*

If you prefer another name for the configuration file, you can tell nose to load the configuration using the -c flag: run the tests with nosetests -c nose.cfg.

details configuration.

Each line of warning filter is separated in maximum 4 sections, that match the first 4 sections of filterwarnings:

filterwarnings(action, message="", category=Warning, module="", lineno=0, append=False)

fields 2 to 4 can be omitted, ie to say 1 line can be of the following form:

action| message
action| message | category
action| message | category | module

the value of each fields is treated the same as for filterwarnigns except: - whitespace are trimmed. - if the category has dots, the corresponding class try to be imported. If it does not have dots, the name is looked up in builtins or __builtins__

test are failing

For some reasons in some systems tests are failing; it seem that this package have difficulty to self-test. That’s likely due to the fact that the tested package need to be in different namespaces, and by self-testing we break this assumption.

Home-page: Author: Matthias Bussonnier Author-email: License: MIT Description: UNKNOWN Platform: UNKNOWN Requires-Python: >=2.7

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nose_warnings_filters, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size nose_warnings_filters-0.1.5-py3-none-any.whl (7.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nose_warnings_filters-0.1.5.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page