Skip to main content

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:

[nosetests]
warningfilters=default         |.*            |DeprecationWarning |notebook.*
               ignore          |.*metadata.*  |DeprecationWarning |notebook.*
               once            |.*schema.*    |UserWarning        |nbfor.*
               error           |.*warn.*      |DeprecationWarning |notebook.services.contents.manager*

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
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: https://github.com/Carreau/nose_warnings_filters Author: Matthias Bussonnier Author-email: bussonniermatthias@gmail.com 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.

Source Distribution

nose_warnings_filters-0.1.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

nose_warnings_filters-0.1.5-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file nose_warnings_filters-0.1.5.tar.gz.

File metadata

File hashes

Hashes for nose_warnings_filters-0.1.5.tar.gz
Algorithm Hash digest
SHA256 456c5b2ccca24e1d00a7b558274ebf9318305813dcb9585951a73ae11d76bb9d
MD5 b66f5357d86e0494f0cbafa80c1239f4
BLAKE2b-256 aed3e938dcf676b40e599551976bacdbaf3c4e10c8f97d7fe65fbf4847615603

See more details on using hashes here.

File details

Details for the file nose_warnings_filters-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for nose_warnings_filters-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 09ad91b734b4069c0ad2dd4a78abb5f02d7150847f954a013d49647fad77ae4e
MD5 8dfb3e8edb011ec132b963017e5a7ac9
BLAKE2b-256 753943df25dd5eebcb60875a594e0e1591f7be21cfa1de331c15b9094f01894b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page