awips2/pythonPackages/nose/unit_tests/test_issue270.rst
mjames-upc e2adf2842d nose 1.3.7
Former-commit-id: 3a5dd251de
2016-03-18 19:50:07 -06:00

22 lines
823 B
ReStructuredText

Multiprocess test collection from packages
------------------------------------------
Tests that the multiprocess plugin correctly collects tests from packages
>>> import os
>>> from nose.plugins.plugintest import run_buffered as run
>>> from nose.plugins.multiprocess import MultiProcess
>>> support = os.path.join(os.path.dirname(__file__), 'support')
>>> issue270 = os.path.join(support, 'issue270')
The test package has a package-level fixture, which causes the entire package
to be dispatched to a multiprocess worker. Tests are still collected and run
properly.
>>> argv = [__file__, '--processes=2', issue270]
>>> run(argv=argv, plugins=[MultiProcess()])
..
----------------------------------------------------------------------
Ran 2 tests in ...s
<BLANKLINE>
OK