Package trac :: Package mimeview :: Package tests :: Module pygments :: Class PygmentsRendererTestCase

Class PygmentsRendererTestCase

source code

            object --+    
                     |    
unittest.case.TestCase --+
                         |
                        PygmentsRendererTestCase

Nested Classes

Inherited from unittest.case.TestCase: failureException

Instance Methods
 
setUp(self)
Hook method for setting up the test fixture before exercising it.
source code
 
test_python_hello(self)
Simple Python highlighting with Pygments (direct)
source code
 
test_python_hello_mimeview(self)
Simple Python highlighting with Pygments (through Mimeview.render)
source code
 
test_python_with_lineno(self) source code
 
test_python_with_lineno_and_markups(self)
Python highlighting with Pygments and lineno annotator
source code
 
test_python_with_invalid_arguments(self) source code
 
test_pygments_lexer_options(self) source code
 
test_pygments_lexer_arguments(self) source code
 
test_pygments_lexer_arguments_override_options(self) source code
 
test_newline_content(self)
The behavior of Pygments changed post-Pygments 0.11.1, and now contains all four newlines.
source code
 
test_empty_content(self)
A '
source code
 
test_extra_mimetypes(self)
The text/x-ini mimetype is normally not known by Trac, but Pygments supports it.
source code

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __init__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription, skipTest, tearDown

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables

Inherited from unittest.case.TestCase: longMessage, maxDiff

Properties
  python_mimetype

Inherited from object: __class__

Method Details

setUp(self)

source code 
Hook method for setting up the test fixture before exercising it.
Overrides: unittest.case.TestCase.setUp
(inherited documentation)

test_newline_content(self)

source code 

The behavior of Pygments changed post-Pygments 0.11.1, and now contains all four newlines. In Pygments 0.11.1 and prior, it only has three since stripnl defaults to True.

See https://trac.edgewall.org/ticket/7705.

test_empty_content(self)

source code 
A '
' token is generated for an empty file, so we have to bypass
pygments when rendering empty files.

Property Details

python_mimetype

Get Method:
unreachable.python_mimetype(self)