def get_sequencer_rows(self,
                           generator,
                           axes_to_move,
                           buffer_class,
                           steps=None):
        """Helper method for comparing table values."""

        buffer_instance = buffer_class.return_value
        generator.prepare()
        completed_steps = 0
        steps_to_do = steps if steps is not None else generator.size

        self.o.on_configure(self.context, completed_steps, steps_to_do, {},
                            generator, axes_to_move)

        rows_gen = buffer_instance.configure.call_args[0][0]
        rows = SequencerRows()
        for rs in rows_gen:
            rows.extend(rs)

        return rows
    def test_extend(self):
        seq_rows = SequencerRows()
        seq_rows.add_seq_entry()
        seq_rows2 = SequencerRows()
        seq_rows2.add_seq_entry(4, Trigger.POSB_LT, 400, 1000, 0, 1, 50)
        seq_rows.extend(seq_rows2)

        total_ticks = (MIN_PULSE * 2) + 4 * (1000 + 950)
        assert isclose(seq_rows.duration, total_ticks * TICK)
        assert len(seq_rows) == 2

        table = seq_rows.get_table()
        assert table.repeats == [1, 4]
        assert table.trigger == [Trigger.IMMEDIATE, Trigger.POSB_LT]
        assert table.position == [0, 400]
        assert table.time1 == [MIN_PULSE, 1000]
        assert table.outa1 == [0, 0]  # Live
        assert table.outb1 == [0, 1]  # Dead
        assert table.outc1 == table.outd1 == table.oute1 == table.outf1 == [
            0, 0
        ]
        assert table.time2 == [MIN_PULSE, 950]
        assert (table.outa2 == table.outb2 == table.outc2 == table.outd2 ==
                table.oute2 == table.outf2 == [0, 0])