Fix for py3

This commit is contained in:
Takeshi KOMIYA
2017-03-04 01:03:29 +09:00
parent 3ba24fb6b8
commit 432ec25d9c
2 changed files with 10 additions and 8 deletions

View File

@@ -1156,9 +1156,9 @@ def test_html_entity(app):
@pytest.mark.sphinx('html', testroot='basic')
def test_html_inventory(app):
app.builder.build_all()
with open(app.outdir / 'objects.inv') as f:
with open(app.outdir / 'objects.inv', 'rb') as f:
invdata = InventoryFile.load(f, 'http://example.com', os.path.join)
assert invdata.keys() == ['std:label', 'std:doc']
assert set(invdata.keys()) == {'std:label', 'std:doc'}
assert set(invdata['std:label'].keys()) == {'modindex', 'genindex', 'search'}
assert invdata['std:label']['modindex'] == ('Python',
'',
@@ -1172,7 +1172,7 @@ def test_html_inventory(app):
'',
'http://example.com/search.html',
'Search Page')
assert invdata['std:doc'].keys() == ['index']
assert set(invdata['std:doc'].keys()) == {'index'}
assert invdata['std:doc']['index'] == ('Python',
'',
'http://example.com/index.html',