def date_from_git_objects(run, objects: Iterable[str]) -> List[int]: cmd = show(objects=objects, diff=False, format='%at') proc = run(cmd) stdout = proc_to_stdout(proc) return list(int(line) for line in stdout)
def test_show_format(): assert show(format="%at") == ["git", "show", "--format=%at"]
def test_show_objects(): assert show(objects=('master', 'feature')) == ["git", "show", "master", "feature"]
def test_show_no_diff(): assert show(diff=False) == ["git", "show", "-s"]
def test_show(): assert show() == ["git", "show"]