nose-xunitmp
raw JSON → 0.4.1 verified Mon Apr 27 auth: no python deprecated
A nose plugin that provides Xunit output when running multiprocess tests. Current version is 0.4.1, last release in 2015, unmaintained since then.
pip install nose-xunitmp Common errors
error ImportError: No module named xunitmp ↓
cause Incorrect import path; the plugin is not a top-level module.
fix
Use: from nose.plugins.xunitmp import XunitMP
error AttributeError: module 'nose' has no attribute 'plugins' ↓
cause nose is not installed or is an incompatible version.
fix
Install nose: pip install nose
error SyntaxError: invalid syntax (xunitmp.py, line 42) ↓
cause The source code contains Python 2 syntax (e.g., print statement) and fails on Python 3.
fix
Use Python 2.7 or switch to pytest.
Warnings
deprecated nose-xunitmp is unmaintained and works only with Python 2.7. Python 3 is not supported. ↓
fix Migrate to pytest with pytest-xdist which supports xunit output natively.
gotcha When using with nose's multiprocess plugin, the xunitmp plugin may produce incomplete results due to race conditions in output collection. ↓
fix Use a single-process runner or switch to pytest.
breaking The plugin does not support Python 3. Installation on Python 3 will fail due to syntax errors in the source. ↓
fix Use Python 2.7 or migrate to an alternative test runner.
Imports
- XunitMP wrong
import nose.xunitmpcorrectfrom nose.plugins.xunitmp import XunitMP
Quickstart
import sys
sys.argv = ['nosetests', '--with-xunitmp', 'test_sample.py']
import nose
nose.main()