Edgewall Software
Modify

Opened 3 hours ago

#13865 assigned defect

2 test failures with Pygments 2.19.0 or later

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.6.1
Component: general Version:
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

======================================================================
FAIL: test_python_hello (trac.mimeview.tests.pygments.PygmentsRendererTestCase.test_python_hello)
Simple Python highlighting with Pygments (direct)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jun66j5/src/tracdev/git/trac/mimeview/tests/pygments.py", line 92, in test_python_hello
    self._test('python_hello_pygments_2.1plus', result)
  File "/home/jun66j5/src/tracdev/git/trac/mimeview/tests/pygments.py", line 76, in _test
    self.assertEqual(split(exp), split(res))
AssertionError: Lists differ: ['<sp[26 chars]>', ' <span class="nf">', 'hello</span>', '<sp[24 chars]an>'] != ['<sp[26 chars]>', '<span class="w">', ' </span>', '<span cla[55 chars]an>']

First differing element 2:
' <span class="nf">'
'<span class="w">'

Second list contains 2 additional elements.
First extra element 6:
'<span class="p">'

  ['<span class="k">',
   'def</span>',
+  '<span class="w">',
+  ' </span>',
-  ' <span class="nf">',
?   -

+  '<span class="nf">',
   'hello</span>',
   '<span class="p">',
   '():</span>']

======================================================================
FAIL: test_python_hello_mimeview (trac.mimeview.tests.pygments.PygmentsRendererTestCase.test_python_hello_mimeview)
Simple Python highlighting with Pygments (through Mimeview.render)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jun66j5/src/tracdev/git/trac/mimeview/tests/pygments.py", line 107, in test_python_hello_mimeview
    self._test('python_hello_mimeview_pygments_2.1plus', result)
  File "/home/jun66j5/src/tracdev/git/trac/mimeview/tests/pygments.py", line 76, in _test
    self.assertEqual(split(exp), split(res))
AssertionError: Lists differ: ['<sp[26 chars]>', ' <span class="nf">', 'hello</span>', '<sp[24 chars]an>'] != ['<sp[26 chars]>', '<span class="w">', ' </span>', '<span cla[55 chars]an>']

First differing element 2:
' <span class="nf">'
'<span class="w">'

Second list contains 2 additional elements.
First extra element 6:
'<span class="p">'

  ['<span class="k">',
   'def</span>',
+  '<span class="w">',
+  ' </span>',
-  ' <span class="nf">',
?   -

+  '<span class="nf">',
   'hello</span>',
   '<span class="p">',
   '():</span>']

----------------------------------------------------------------------
Ran 2810 tests in 30.870s

FAILED (failures=2, skipped=5)
make: *** [Makefile:477: unit-test] Error 1

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Jun Omae.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.