[Python-modules-commits] r31344 - in packages/python-markdown/trunk/debian (4 files)

mitya57-guest at users.alioth.debian.org mitya57-guest at users.alioth.debian.org
Sat Nov 1 09:36:21 UTC 2014


    Date: Saturday, November 1, 2014 @ 09:36:19
  Author: mitya57-guest
Revision: 31344

Disable two tests that were relying on wrong assumption about Pygments
lexer guessing algorithm (closes: #767579).

Added:
  packages/python-markdown/trunk/debian/patches/
  packages/python-markdown/trunk/debian/patches/disable_wrong_tests.patch
  packages/python-markdown/trunk/debian/patches/series
Modified:
  packages/python-markdown/trunk/debian/changelog

Modified: packages/python-markdown/trunk/debian/changelog
===================================================================
--- packages/python-markdown/trunk/debian/changelog	2014-11-01 01:36:28 UTC (rev 31343)
+++ packages/python-markdown/trunk/debian/changelog	2014-11-01 09:36:19 UTC (rev 31344)
@@ -1,3 +1,10 @@
+python-markdown (2.5.1-2) UNRELEASED; urgency=medium
+
+  * Disable two tests that were relying on wrong assumption about Pygments
+    lexer guessing algorithm (closes: #767579).
+
+ -- Dmitry Shachnev <mitya57 at debian.org>  Sat, 01 Nov 2014 12:34:55 +0300
+
 python-markdown (2.5.1-1) unstable; urgency=medium
 
   * New upstream bugfix release.

Added: packages/python-markdown/trunk/debian/patches/disable_wrong_tests.patch
===================================================================
--- packages/python-markdown/trunk/debian/patches/disable_wrong_tests.patch	                        (rev 0)
+++ packages/python-markdown/trunk/debian/patches/disable_wrong_tests.patch	2014-11-01 09:36:19 UTC (rev 31344)
@@ -0,0 +1,54 @@
+Description: disable tests that are not working with new Pygments
+ These tests were relying on wrong assumption that Pygments will
+ correctly guess the lexer for some one-line piece of code.
+ .
+ However, previous versions of Pygments worked only by chance
+ (this code was recognized as sources.list extract), but this wrong
+ behaviour was changed in new Pygments release.
+Author: Dmitry Shachnev <mitya57 at debian.org>
+Forwarded: yes, https://github.com/waylan/Python-Markdown/issues/361
+Last-Update: 2014-11-01
+
+--- a/tests/test_extensions.py
++++ b/tests/test_extensions.py
+@@ -87,19 +87,6 @@
+         except ImportError:
+             self.has_pygments = False
+ 
+-    def testBasicCodeHilite(self):
+-        text = '\t# A Code Comment'
+-        md = markdown.Markdown(extensions=['markdown.extensions.codehilite'])
+-        if self.has_pygments:
+-            self.assertEqual(md.convert(text),
+-                '<div class="codehilite">'
+-                '<pre><span class="c"># A Code Comment</span>\n'
+-                '</pre></div>')
+-        else:
+-            self.assertEqual(md.convert(text),
+-                '<pre class="codehilite"><code># A Code Comment'
+-                '</code></pre>')
+-    
+     def testLinenumsTrue(self):
+         text = '\t# A Code Comment'
+         md = markdown.Markdown(
+@@ -129,20 +116,6 @@
+                 '<pre class="codehilite"><code class="language-python"># A Code Comment'
+                 '</code></pre>')
+ 
+-    def testLinenumsNone(self):
+-        text = '\t# A Code Comment'
+-        md = markdown.Markdown(
+-            extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=None)])
+-        if self.has_pygments:
+-            self.assertEqual(md.convert(text),
+-                '<div class="codehilite">'
+-                '<pre><span class="c"># A Code Comment</span>\n'
+-                '</pre></div>')
+-        else:
+-            self.assertEqual(md.convert(text),
+-                '<pre class="codehilite"><code># A Code Comment'
+-                '</code></pre>')
+-
+     def testLinenumsNoneWithShebang(self):
+         text = '\t#!Python\n\t# A Code Comment'
+         md = markdown.Markdown(

Added: packages/python-markdown/trunk/debian/patches/series
===================================================================
--- packages/python-markdown/trunk/debian/patches/series	                        (rev 0)
+++ packages/python-markdown/trunk/debian/patches/series	2014-11-01 09:36:19 UTC (rev 31344)
@@ -0,0 +1 @@
+disable_wrong_tests.patch




More information about the Python-modules-commits mailing list