MCPcopy
hub / github.com/treeverse/dvc / with_aliases

Function with_aliases

tests/func/test_data_status.py:695–706  ·  view source on GitHub ↗

Generate test cases by reusing values for given aliases from existing ones.

(values, aliases)

Source from the content-addressed store, hash-verified

693
694
695def with_aliases(values, aliases):
696 """Generate test cases by reusing values for given aliases from existing ones."""
697 for value in values:
698 targets = value[0]
699 assert isinstance(targets, tuple)
700 yield param(*value)
701 yield from (
702 param(alias, *rest)
703 for alias, to in aliases.items()
704 for targets, *rest in values
705 if to == targets
706 )
707
708
709@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

paramFunction · 0.85
itemsMethod · 0.80

Tested by

no test coverage detected