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

Function test_drop_duplicates_rich_text

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

Source from the content-addressed store, hash-verified

294
295
296def test_drop_duplicates_rich_text():
297 from dvc.ui import ui
298
299 td = TabularData(["col-1", "col-2", "col-3"], fill_value="-")
300
301 td.extend(
302 [
303 ["foo", None, ui.rich_text("-")],
304 ["foo", "foo"],
305 ["foo", "foo"],
306 ["foo", "bar", "foobar"],
307 ]
308 )
309
310 assert list(td) == [
311 ["foo", "-", ui.rich_text("-")],
312 ["foo", "foo", "-"],
313 ["foo", "foo", "-"],
314 ["foo", "bar", "foobar"],
315 ]
316
317 td.drop_duplicates("cols")
318
319 assert list(td) == [["-"], ["foo"], ["foo"], ["bar"]]
320
321
322@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 4

extendMethod · 0.95
drop_duplicatesMethod · 0.95
TabularDataClass · 0.90
rich_textMethod · 0.80

Tested by

no test coverage detected