def test_python_hello_mimeview(self):
        result = Mimeview(self.env).render(self.context, 'text/x-python', """
def hello():
        return "Hello World!"
""")
        self.assertTrue(result)
        if pygments_version < parse_version('2.1'):
            self._test('python_hello_mimeview', result)
        else:
            self._test('python_hello_mimeview_pygments_2.1plus', result)
Simple Python highlighting with Pygments (through Mimeview.render)
dataset/ETHPy150Open edgewall/trac/trac/mimeview/tests/pygments.py/PygmentsRendererTestCase.test_python_hello_mimeview