forked from pool/python-sphinxcontrib-jsmath
- Add upstream patch sphinx5.patch to fix build with the new Sphinx OBS-URL: https://build.opensuse.org/request/show/979840 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinxcontrib-jsmath?expand=0&rev=5
39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
From 3297b27177ab4862d1b2408a2db66235397fe212 Mon Sep 17 00:00:00 2001
|
|
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
|
|
Date: Sat, 17 Jul 2021 19:25:37 +0900
|
|
Subject: [PATCH] Fix #9361: RemovedInSphinx50Warning on testing
|
|
|
|
---
|
|
tests/test_jsmath.py | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/tests/test_jsmath.py b/tests/test_jsmath.py
|
|
index 573d262..eea8a95 100644
|
|
--- a/tests/test_jsmath.py
|
|
+++ b/tests/test_jsmath.py
|
|
@@ -14,7 +14,7 @@
|
|
@pytest.mark.sphinx('html', testroot='basic')
|
|
def test_basic(app, status, warning):
|
|
app.builder.build_all()
|
|
- content = (app.outdir / 'math.html').text()
|
|
+ content = (app.outdir / 'math.html').read_text()
|
|
print(content)
|
|
assert '<div class="math notranslate nohighlight">\nE = mc^2</div>' in content
|
|
assert ('<span class="eqno">(1)<a class="headerlink" href="#equation-pythagorean" '
|
|
@@ -34,7 +34,7 @@ def test_basic(app, status, warning):
|
|
def test_numfig_enabled(app, status, warning):
|
|
app.builder.build_all()
|
|
|
|
- content = (app.outdir / 'math.html').text()
|
|
+ content = (app.outdir / 'math.html').read_text()
|
|
assert '<div class="math notranslate nohighlight">\nE = mc^2</div>' in content
|
|
assert ('<span class="eqno">(1.1)<a class="headerlink" href="#equation-pythagorean" '
|
|
'title="Permalink to this equation">¶</a></span>'
|
|
@@ -52,5 +52,5 @@ def test_numfig_enabled(app, status, warning):
|
|
def test_disabled_when_equations_not_found(app, status, warning):
|
|
app.builder.build_all()
|
|
|
|
- content = (app.outdir / 'index.html').text()
|
|
+ content = (app.outdir / 'index.html').read_text()
|
|
assert 'jsmath.js' not in content
|