Fix broken tests by 7bb685bbe9

This commit is contained in:
Takeshi KOMIYA 2016-01-03 20:52:39 +09:00
parent 7bb685bbe9
commit 26c43643d3
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
extensions = ['sphinx.ext.doctest'] extensions = ['sphinx.ext.doctest']
project = 'test project for doctest' project = 'test project for doctest'
master_doc = 'doctest.txt' master_doc = 'doctest'
source_suffix = '.txt' source_suffix = '.txt'

View File

@ -76,12 +76,14 @@ def test_build_all():
@with_app(buildername='text') @with_app(buildername='text')
def test_master_doc_not_found(app, status, warning): def test_master_doc_not_found(app, status, warning):
(app.srcdir / 'contents.txt').unlink() (app.srcdir / 'contents.txt').move(app.srcdir / 'contents.txt.bak')
try: try:
app.builder.build_all() app.builder.build_all()
assert False # SphinxError not raised assert False # SphinxError not raised
except Exception as exc: except Exception as exc:
assert isinstance(exc, SphinxError) assert isinstance(exc, SphinxError)
finally:
(app.srcdir / 'contents.txt.bak').move(app.srcdir / 'contents.txt')
@with_app(buildername='text', testroot='circular') @with_app(buildername='text', testroot='circular')