MCPcopy
hub / github.com/mne-tools/mne-python / test_progressbar_parallel_basic

Function test_progressbar_parallel_basic

mne/utils/tests/test_progressbar.py:60–69  ·  view source on GitHub ↗

Test ProgressBar with parallel computing, basic version.

(capsys)

Source from the content-addressed store, hash-verified

58
59
60def test_progressbar_parallel_basic(capsys):
61 """Test ProgressBar with parallel computing, basic version."""
62 assert capsys.readouterr().out == ""
63 parallel, p_fun, _ = parallel_func(_identity, total=10, n_jobs=1, verbose=True)
64 with use_log_level(True):
65 out = parallel(p_fun(x) for x in range(10))
66 assert out == list(range(10))
67 cap = capsys.readouterr()
68 out = cap.err
69 assert "100%" in out
70
71
72def _identity_block(x, pb):

Callers

nothing calls this directly

Calls 2

parallel_funcFunction · 0.90
use_log_levelClass · 0.90

Tested by

no test coverage detected