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

Method _fake_run

tests/test_manager.py:552–582  ·  view source on GitHub ↗
(
                ext,
                files,
                batch_size=None,
                jobs=1,
                on_start=None,
                on_result=None,
                manifest=None,
            )

Source from the content-addressed store, hash-verified

550 mock_make_ext.return_value = MagicMock()
551
552 def _fake_run(
553 ext,
554 files,
555 batch_size=None,
556 jobs=1,
557 on_start=None,
558 on_result=None,
559 manifest=None,
560 ):
561 batch = BatchResult()
562 for gz_path in files:
563 if on_start:
564 on_start(gz_path)
565 mp = _make_manpage(
566 "bio-eagle",
567 distro="distro",
568 release="release",
569 aliases=[("bio-eagle", 10)],
570 )
571 raw = _make_raw(sha256=gz_path)
572 entry = ExtractionResult(
573 gz_path=gz_path,
574 outcome=ExtractionOutcome.SUCCESS,
575 mp=mp,
576 raw=raw,
577 stats=ExtractionStats(),
578 )
579 batch.n_succeeded += 1
580 if on_result:
581 on_result(gz_path, entry)
582 return batch
583
584 mock_run.side_effect = _fake_run
585

Callers

nothing calls this directly

Calls 7

BatchResultClass · 0.90
ExtractionResultClass · 0.90
ExtractionStatsClass · 0.90
on_startFunction · 0.85
_make_manpageFunction · 0.70
_make_rawFunction · 0.70
on_resultFunction · 0.50

Tested by

no test coverage detected