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

Method _fake_run

tests/test_manager.py:899–917  ·  view source on GitHub ↗
(ext, files, **kwargs)

Source from the content-addressed store, hash-verified

897 mock_make_ext.return_value = MagicMock()
898
899 def _fake_run(ext, files, **kwargs):
900 batch = BatchResult()
901 for gz_path in files:
902 if kwargs.get("on_start"):
903 kwargs["on_start"](gz_path)
904 source = mock_source(gz_path)
905 mp = _make_manpage_from_source(source)
906 raw = _make_raw(sha256="aaa" if "gfortran" in gz_path else "bbb")
907 entry = ExtractionResult(
908 gz_path=gz_path,
909 outcome=ExtractionOutcome.SUCCESS,
910 mp=mp,
911 raw=raw,
912 stats=ExtractionStats(),
913 )
914 batch.n_succeeded += 1
915 if kwargs.get("on_result"):
916 kwargs["on_result"](gz_path, entry)
917 return batch
918
919 mock_run.side_effect = _fake_run
920

Callers

nothing calls this directly

Calls 5

BatchResultClass · 0.90
ExtractionResultClass · 0.90
ExtractionStatsClass · 0.90
_make_rawFunction · 0.70

Tested by

no test coverage detected