コード例 #1
0
    def test_zip_range_arguments_correct_with_buffers_before_and_after(self):
        with self._isolate_sut(
                buffer_count=5,
                current_index=2,
                zip_result_list=[11, 22]) as zip_mock:

            list(localcomplete.generate_buffers_search_order())
        zip_mock.assert_called_once_with([1, 0], [3, 4])
コード例 #2
0
    def test_zip_range_arguments_correct_with_only_one_buffer(self):
        with self._isolate_sut(
                buffer_count=1,
                current_index=0,
                zip_result_list=[11, 22]) as zip_mock:

            list(localcomplete.generate_buffers_search_order())
        zip_mock.assert_called_once_with([], [])
コード例 #3
0
    def test_generating_a_sequence(self):
        with self._isolate_sut(
                buffer_count=9,
                current_index=5,
                zip_result_list=[11, 22]):

            actual_result = list(localcomplete.generate_buffers_search_order())
        self.assertEqual(actual_result, [5, 11, 22])