PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/unit_tests/test_issue270.rst

https://bitbucket.org/jpellerin/nose/
ReStructuredText | 22 lines | 18 code | 4 blank | 0 comment | 0 complexity | 15757afcafdaf7e48eb18335ff66b2e8 MD5 | raw file
 1Multiprocess test collection from packages
 2------------------------------------------
 3
 4Tests that the multiprocess plugin correctly collects tests from packages
 5
 6    >>> import os
 7    >>> from nose.plugins.plugintest import run_buffered as run
 8    >>> from nose.plugins.multiprocess import MultiProcess
 9    >>> support = os.path.join(os.path.dirname(__file__), 'support')
10    >>> issue270 = os.path.join(support, 'issue270')
11
12The test package has a package-level fixture, which causes the entire package
13to be dispatched to a multiprocess worker. Tests are still collected and run
14properly.
15
16    >>> argv = [__file__, '--processes=2', issue270]
17    >>> run(argv=argv, plugins=[MultiProcess()])
18    ..
19    ----------------------------------------------------------------------
20    Ran 2 tests in ...s
21    <BLANKLINE>
22    OK