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