diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-02-17 20:58:32 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-17 20:58:32 +0900 |
commit | 527e95540538f5896a0236647d13a6e281144c4b (patch) | |
tree | 41c8aa54dc3865440278648dca383075e6f3a064 /tests/test_intl.py | |
parent | fcb22f20743de2028bbc35d44419649928b452fc (diff) | |
parent | 90bf81bd379793c1144a2ecd955b4da4cff0fe37 (diff) | |
download | sphinx-git-527e95540538f5896a0236647d13a6e281144c4b.tar.gz |
Merge pull request #6085 from tk0miya/refactor_tests_unpickle
test: Use get_doctree() to load doctree files
Diffstat (limited to 'tests/test_intl.py')
-rw-r--r-- | tests/test_intl.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/test_intl.py b/tests/test_intl.py index 786c31386..367409fd9 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -10,7 +10,6 @@ """ import os -import pickle import re import pytest @@ -1188,9 +1187,9 @@ def test_text_references(app, warning): @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_image_glob_intl(app): app.build() - # index.rst - doctree = pickle.loads((app.doctreedir / 'index.doctree').bytes()) + # index.rst + doctree = app.env.get_doctree('index') assert_node(doctree[0][1], nodes.image, uri='rimg.xx.png', candidates={'*': 'rimg.xx.png'}) @@ -1210,8 +1209,7 @@ def test_image_glob_intl(app): 'image/png': 'img.png'}) # subdir/index.rst - doctree = pickle.loads((app.doctreedir / 'subdir/index.doctree').bytes()) - + doctree = app.env.get_doctree('subdir/index') assert_node(doctree[0][1], nodes.image, uri='subdir/rimg.xx.png', candidates={'*': 'subdir/rimg.xx.png'}) @@ -1236,9 +1234,9 @@ def test_image_glob_intl(app): @pytest.mark.xfail(os.name != 'posix', reason="Not working on windows") def test_image_glob_intl_using_figure_language_filename(app): app.build() - # index.rst - doctree = pickle.loads((app.doctreedir / 'index.doctree').bytes()) + # index.rst + doctree = app.env.get_doctree('index') assert_node(doctree[0][1], nodes.image, uri='rimg.png.xx', candidates={'*': 'rimg.png.xx'}) @@ -1258,8 +1256,7 @@ def test_image_glob_intl_using_figure_language_filename(app): 'image/png': 'img.png'}) # subdir/index.rst - doctree = pickle.loads((app.doctreedir / 'subdir/index.doctree').bytes()) - + doctree = app.env.get_doctree('subdir/index') assert_node(doctree[0][1], nodes.image, uri='subdir/rimg.png', candidates={'*': 'subdir/rimg.png'}) |