From 26c43643d349553c1acb45884ac5f73a359f16db Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 3 Jan 2016 20:52:39 +0900 Subject: [PATCH] Fix broken tests by 7bb685bbe97824bc2c65bf8cb1d7ac38e5f91cd4 --- tests/roots/test-doctest/conf.py | 2 +- tests/test_build.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/roots/test-doctest/conf.py b/tests/roots/test-doctest/conf.py index f6a12edb9..2e721fb57 100644 --- a/tests/roots/test-doctest/conf.py +++ b/tests/roots/test-doctest/conf.py @@ -1,5 +1,5 @@ extensions = ['sphinx.ext.doctest'] project = 'test project for doctest' -master_doc = 'doctest.txt' +master_doc = 'doctest' source_suffix = '.txt' diff --git a/tests/test_build.py b/tests/test_build.py index aa5d72ce9..97ef651a6 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -76,12 +76,14 @@ def test_build_all(): @with_app(buildername='text') 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: app.builder.build_all() assert False # SphinxError not raised except Exception as exc: assert isinstance(exc, SphinxError) + finally: + (app.srcdir / 'contents.txt.bak').move(app.srcdir / 'contents.txt') @with_app(buildername='text', testroot='circular')