File: 0013-test-drop-test-that-depends-on-Python-internals.patch

package info (click to toggle)
ruby-pygments.rb 1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,008 kB
  • sloc: ansic: 1,869; ruby: 612; python: 518; makefile: 10; sh: 4
file content (24 lines) | stat: -rw-r--r-- 961 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Antonio Terceiro <asa@terceiro.xyz>
Date: Thu, 13 Feb 2020 14:39:00 -0300
Subject: test: drop test that depends on Python internals

This test works on Python 2 because for some reason the "Python" lexers
comes later, and overrides the "IPython" one in the mime type index. On
Python 3, that order is different, and a lookup for "text/x-python"
will return the "IPython" lexer instead.
---
 test/test_pygments.rb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/test/test_pygments.rb b/test/test_pygments.rb
index ee659c6..c919415 100644
--- a/test/test_pygments.rb
+++ b/test/test_pygments.rb
@@ -237,7 +237,6 @@ class PygmentsLexerClassTest < Test::Unit::TestCase
  def test_find_lexer_by_mimetype
     assert_equal P::Lexer['Ruby'], P::Lexer.find_by_mimetype('text/x-ruby')
     assert_equal P::Lexer['JSON'], P::Lexer.find_by_mimetype('application/json')
-    assert_equal P::Lexer['Python'], P::Lexer.find_by_mimetype('text/x-python')
  end
 end