コード例 #1
0
ファイル: test_metaline.py プロジェクト: bubthegreat/mudpyl
def test_RunLengthList_copy_copies_non_empty():
    r = RunLengthList([(0, 'foo')])
    assert r == r.copy()
    assert not r.items() is r.copy().items()
コード例 #2
0
ファイル: test_metaline.py プロジェクト: bubthegreat/mudpyl
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
コード例 #3
0
ファイル: test_metaline.py プロジェクト: bubthegreat/mudpyl
def test_copy_returns_different_lists():
    r = RunLengthList([(0, 'foo')])
    assert r.items() is not r.copy().items()