judge.run_dependents(worktree, unit, python, original, source_dir, timeout)
Run the unit’s dependents against the module in worktree.
Two kinds of dependents run, each in a fresh interpreter with the environment of run_pytest: every declared consumer of kind code below source_dir is imported, and every live docstring example of the unit’s public names in the original module is executed, so the documentation is checked against the replacement.
tuple[Tally, str]: Passed and failed dependents (errors is always 0) and a log with one PASS/FAIL line per dependent, followed by the end of the error output of a failure.
Examples
import sysfrom pathlib import Pathfrom tempfile import TemporaryDirectoryfrom spotregen import load_spec, make_sample_repofrom spotregen.judge import run_dependentswith TemporaryDirectory() as tmp: root = make_sample_repo(Path(tmp) /"demo") unit = load_spec(root).units["samplepkg.core.calc"] original = (root / unit.path).read_text()print(run_dependents(root, unit, Path(sys.executable), original, "src", 60)[0])