def test_RunLengthList_copy_copies_non_empty(): r = RunLengthList([(0, 'foo')]) assert r == r.copy() assert not r.items() is r.copy().items()
def test_Metaline_insert_fg_bg_on_too_long(): fores, backs = RunLengthList([(0, 'foo')]), RunLengthList([(0, 'bar')]) m = Metaline('foo', fores.copy(), backs.copy()) m.insert(2, 'bar') assert m.fores == fores, m.backs == backs
def test_copy_returns_different_lists(): r = RunLengthList([(0, 'foo')]) assert r.items() is not r.copy().items()