def test_should_fail_when_appending(self): # given lst = TypedList((int,), *[1, 2, 3]) # then with pytest.raises(TypeError) as _: lst.append("4")
def test_should_append_items(self): # given lst = TypedList((int,), *[1, 2, 3]) # when lst.append(4) # then assert len(lst) == 4 assert 4 in lst