def _normalize_to_caption(self, text):
        tu = isinstance(text, unicode)
        cu = isinstance(self._caption, unicode)
        if tu == cu:
            return text
        if tu:
            return text.encode('ascii') # follow python2's implicit conversion
        return text.decode('ascii')
Record that C{test} failed an assertion with the error C{err}.
dataset/ETHPy150Open AnyMesh/anyMesh-Python/example/urwid/widget.py/Edit._normalize_to_caption--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/trial/reporter.py/SubunitReporter.addFailure