Edgewall Software
Modify

Opened 5 weeks ago

Closed 5 weeks ago

#13865 closed defect (fixed)

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:

Fixed 2 test failures with Pygments 2.19.0 or later.

API Changes:
Internal Changes:

Description (last modified by Jun Omae)

======================================================================
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 (1)

comment:1 by Jun Omae, 5 weeks ago

Description: modified (diff)
Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Fixed in [17873] and merged in [17879].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
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.