MCPcopy Index your code
hub / github.com/treeverse/dvc / test_diff_default

Function test_diff_default

tests/unit/test_compare.py:218–238  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

216
217
218def test_diff_default(capsys):
219 show_diff(
220 {
221 "metrics.yaml": {
222 "x.b": {"old": 5, "new": 6},
223 "a.d.e": {"old": 3, "new": 4, "diff": 1},
224 "a.b.c": {"old": 1, "new": 2, "diff": 1},
225 }
226 },
227 "Metric",
228 )
229 out, _ = capsys.readouterr()
230
231 assert out == textwrap.dedent(
232 """\
233 Path Metric HEAD workspace Change
234 metrics.yaml a.b.c 1 2 1
235 metrics.yaml a.d.e 3 4 1
236 metrics.yaml x.b 5 6 -
237 """
238 )
239
240
241def test_metrics_diff_md(capsys):

Callers

nothing calls this directly

Calls 1

show_diffFunction · 0.90

Tested by

no test coverage detected