Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/tests/test_revision_content_layer.py
Show First 20 Lines • Show All 311 Lines • ▼ Show 20 Lines | for synth_rev in synthetic_revision_content_result(syntheticfile): | ||||
== provenance.storage.content_get([dc["dst"]])[dc["dst"]].timestamp() | == provenance.storage.content_get([dc["dst"]])[dc["dst"]].timestamp() | ||||
), synth_rev["msg"] | ), synth_rev["msg"] | ||||
if provenance.storage.with_path(): | if provenance.storage.with_path(): | ||||
# check for location entries | # check for location entries | ||||
rows["location"] |= set(x["path"].encode() for x in synth_rev["R_C"]) | rows["location"] |= set(x["path"].encode() for x in synth_rev["R_C"]) | ||||
rows["location"] |= set(x["path"].encode() for x in synth_rev["D_C"]) | rows["location"] |= set(x["path"].encode() for x in synth_rev["D_C"]) | ||||
rows["location"] |= set(x["path"].encode() for x in synth_rev["R_D"]) | rows["location"] |= set(x["path"].encode() for x in synth_rev["R_D"]) | ||||
assert rows["location"] == provenance.storage.location_get_all(), synth_rev[ | assert rows["location"] == set( | ||||
"msg" | provenance.storage.location_get_all().values() | ||||
] | ), synth_rev["msg"] | ||||
@pytest.mark.parametrize( | @pytest.mark.parametrize( | ||||
"repo, lower, mindepth", | "repo, lower, mindepth", | ||||
( | ( | ||||
("cmdbts2", True, 1), | ("cmdbts2", True, 1), | ||||
("cmdbts2", False, 1), | ("cmdbts2", False, 1), | ||||
("cmdbts2", True, 2), | ("cmdbts2", True, 2), | ||||
▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines |