jogo / nose-socket-whitelist

nose plugin that provides control over what socket connections can be opened during test execution

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nose-socket-whitelist

A nose plugin that patches socket.getaddrinfo for non-local sockets, allowing you to either log all occurrences or cause the offending test to fail.

socketwhitelist.plugins.LoggingSocketWhitelistPlugin
logs the test(s) where sockets are opened, printing a summary report to sys.stderr when all tests have finished executing
socketwhitelist.plugins.ErroringSocketWhitelistPlugin
causes the offending test to fail with a SocketError

Installation

The plugin package is available from PyPI as nose-socket-whitelist.

Using pip:

pip install -U nose-socket-whitelist

or with setuptools/distribute:

easy_install -U nose-socket-whitelist

About

nose plugin that provides control over what socket connections can be opened during test execution

License:Apache License 2.0


Languages

Language:Python 97.7%Language:Makefile 2.3%