def _get_test_output(self, no_ansi=True):
        """Clean the output from stream and return it in list form.

        Returns
        -------
        list
            Clean output from stream
        """
        self._stream.seek(0)
        data = self._stream.readlines()
        output = {}
        output_text = []
        output_colors = []

        for line in data:
            clean_line = strip_ansi(line.strip('\n')) if no_ansi else line.strip('\n')
            if clean_line != '':
                output_text.append(get_coded_text(clean_line))

            colors_found = find_colors(line.strip('\n'))
            if colors_found:
                tmp = []
                for color in colors_found:
                    tmp.append(re.sub(r'[^0-9]', '', color, flags=re.I))
                output_colors.append(tmp)

        output['text'] = output_text
        output['colors'] = output_colors

        return output
Clean the output from stream and return it in list form.

        Returns
        -------
        list
            Clean output from stream
        
tests/test_halo.py