Beispiel #1
0
def test_MontyList_sort():
    mt = MontyList([1, 4, 3, {"a": 5}, {"a": 4}])
    mt.sort("a", 1)
    assert mt == [1, 4, 3, {"a": 4}, {"a": 5}]
Beispiel #2
0
def test_MontyList_getitem_err():
    mt = MontyList([1, 2, 3])
    with pytest.raises(TypeError):
        mt["ind"]