mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8205 from tk0miya/test_with_pygments270
Fix our test failed with pygments-2.7.0
This commit is contained in:
commit
b5dc3adf66
@ -10,8 +10,10 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
from distutils.version import LooseVersion
|
||||||
from itertools import cycle, chain
|
from itertools import cycle, chain
|
||||||
|
|
||||||
|
import pygments
|
||||||
import pytest
|
import pytest
|
||||||
from html5lib import HTMLParser
|
from html5lib import HTMLParser
|
||||||
|
|
||||||
@ -1591,4 +1593,8 @@ def test_html_codeblock_linenos_style_inline(app):
|
|||||||
app.build()
|
app.build()
|
||||||
content = (app.outdir / 'index.html').read_text()
|
content = (app.outdir / 'index.html').read_text()
|
||||||
|
|
||||||
|
pygments_version = tuple(LooseVersion(pygments.__version__).version)
|
||||||
|
if pygments_version > (2, 7):
|
||||||
|
assert '<span class="linenos">1</span>' in content
|
||||||
|
else:
|
||||||
assert '<span class="lineno">1 </span>' in content
|
assert '<span class="lineno">1 </span>' in content
|
||||||
|
Loading…
Reference in New Issue
Block a user