mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
test: Fix ResourceWarning
This commit is contained in:
parent
ccd7381d38
commit
0e2e31a612
@ -32,8 +32,9 @@ def test_dirhtml(app, status, warning):
|
||||
assert 'href="bar/"' in content
|
||||
|
||||
# objects.inv (refs: #7095)
|
||||
f = (app.outdir / 'objects.inv').open('rb')
|
||||
invdata = InventoryFile.load(f, 'path/to', posixpath.join)
|
||||
with (app.outdir / 'objects.inv').open('rb') as f:
|
||||
invdata = InventoryFile.load(f, 'path/to', posixpath.join)
|
||||
|
||||
assert 'index' in invdata.get('std:doc')
|
||||
assert ('Python', '', 'path/to/', '-') == invdata['std:doc']['index']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user