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

Function test_protected

tests/unit/test_tabular_data.py:157–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155
156
157def test_protected():
158 td = TabularData(["col1", "col2", "col3", "other"])
159 td.append(["foo", "bar", "baz", "other_val"])
160 td.protect("col1", "col2")
161
162 td.drop("col1", "col2", "col3", "other")
163 assert td.keys() == ["col1", "col2"]
164 assert list(td) == [["foo", "bar"]]
165
166 td.unprotect("col2")
167
168 td.drop("col1", "col2")
169 assert td.keys() == ["col1"]
170 assert list(td) == [["foo"]]
171
172
173def test_row_from_dict():

Callers

nothing calls this directly

Calls 6

appendMethod · 0.95
protectMethod · 0.95
dropMethod · 0.95
keysMethod · 0.95
unprotectMethod · 0.95
TabularDataClass · 0.90

Tested by

no test coverage detected