BuildEnvironment always own application object (after read phase)

This commit is contained in:
Takeshi KOMIYA
2017-03-06 00:30:12 +09:00
parent a523f9893a
commit c7bec75bcd
5 changed files with 50 additions and 55 deletions

View File

@@ -497,7 +497,7 @@ def test_gettext_buildr_ignores_only_directive(app):
def test_gettext_dont_rebuild_mo(make_app, app_params, build_mo):
# --- don't rebuild by .mo mtime
def get_number_of_update_targets(app_):
updated = app_.env.update(app_.config, app_.srcdir, app_.doctreedir, app_)
updated = app_.env.update(app_.config, app_.srcdir, app_.doctreedir)
return len(updated)
# setup new directory
@@ -680,12 +680,12 @@ def test_html_rebuild_mo(app):
app.build()
# --- rebuild by .mo mtime
app.builder.build_update()
updated = app.env.update(app.config, app.srcdir, app.doctreedir, app)
updated = app.env.update(app.config, app.srcdir, app.doctreedir)
assert len(updated) == 0
mtime = (app.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').stat().st_mtime
(app.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').utime((mtime + 5, mtime + 5))
updated = app.env.update(app.config, app.srcdir, app.doctreedir, app)
updated = app.env.update(app.config, app.srcdir, app.doctreedir)
assert len(updated) == 1