def assert_output(self, expected):
        """Asserts that the current output string contains the expected."""
        output = self._captured.after
        decoded = output.decode('utf-8')
        assert expected in decoded, f'decoded={decoded}\nexpected={expected})'
Asserts that the current output string contains the expected.
numba/tests/gdb_support.py