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