mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix test_env after update() API change.
This commit is contained in:
parent
1861a9ec5d
commit
cc8030b074
@ -37,8 +37,7 @@ def warning_emitted(file, text):
|
|||||||
# afford to not run update() in the setup but in its own test
|
# afford to not run update() in the setup but in its own test
|
||||||
|
|
||||||
def test_first_update():
|
def test_first_update():
|
||||||
it = env.update(app.config, app.srcdir, app.doctreedir, app)
|
msg, num, it = env.update(app.config, app.srcdir, app.doctreedir, app)
|
||||||
msg = it.next()
|
|
||||||
assert msg.endswith('%d added, 0 changed, 0 removed' % len(env.found_docs))
|
assert msg.endswith('%d added, 0 changed, 0 removed' % len(env.found_docs))
|
||||||
docnames = set()
|
docnames = set()
|
||||||
for docname in it: # the generator does all the work
|
for docname in it: # the generator does all the work
|
||||||
@ -80,8 +79,7 @@ def test_second_update():
|
|||||||
# the contents.txt toctree; otherwise section numbers would shift
|
# the contents.txt toctree; otherwise section numbers would shift
|
||||||
(root / 'autodoc.txt').unlink()
|
(root / 'autodoc.txt').unlink()
|
||||||
(root / 'new.txt').write_text('New file\n========\n')
|
(root / 'new.txt').write_text('New file\n========\n')
|
||||||
it = env.update(app.config, app.srcdir, app.doctreedir, app)
|
msg, num, it = env.update(app.config, app.srcdir, app.doctreedir, app)
|
||||||
msg = it.next()
|
|
||||||
assert '1 added, 3 changed, 1 removed' in msg
|
assert '1 added, 3 changed, 1 removed' in msg
|
||||||
docnames = set()
|
docnames = set()
|
||||||
for docname in it:
|
for docname in it:
|
||||||
|
Loading…
Reference in New Issue
Block a user