MCPcopy Index your code
hub / github.com/idank/explainshell / test_parallel_mode

Method test_parallel_mode

tests/extraction/test_runner.py:612–621  ·  view source on GitHub ↗

jobs > 1 runs in parallel.

(self)

Source from the content-addressed store, hash-verified

610 self.assertEqual(batch.n_succeeded, 1)
611
612 def test_parallel_mode(self):
613 """jobs > 1 runs in parallel."""
614 ext = MagicMock()
615 result = _make_result("/fake/a.1.gz")
616 ext.extract.return_value = result
617
618 batch, files = run_collected(ext, ["/fake/a.1.gz"], jobs=2)
619
620 ext.extract.assert_called_once_with("/fake/a.1.gz")
621 self.assertEqual(batch.n_succeeded, 1)
622
623 def test_parallel_mode_submits_only_jobs_initially(self):
624 """The parallel runner keeps only `jobs` tasks submitted at first."""

Callers

nothing calls this directly

Calls 2

run_collectedFunction · 0.90
_make_resultFunction · 0.85

Tested by

no test coverage detected