Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def test_count_minus_two(self):
     """Test with a count of -2."""
     with pytest.raises(ValueError):
         utils.newest_slice([], -2)
Exemplo n.º 4
0
 def test_count_minus_two(self):
     """Test with a count of -2."""
     with pytest.raises(ValueError):
         utils.newest_slice([], -2)