def test_good(self, items, count, expected): """Test slices which shouldn't raise an exception.""" sliced = utils.newest_slice(items, count) assert list(sliced) == list(expected)
def test_count_minus_two(self): """Test with a count of -2.""" with pytest.raises(ValueError): utils.newest_slice([], -2)