From fc37223d1b3b0430c38f09c88e0a279212a762ee Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 9 Apr 2017 11:36:13 +0200 Subject: [PATCH] Regenerate docs properly for qute:help test --- tests/end2end/features/misc.feature | 3 ++- tests/end2end/features/test_misc_bdd.py | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index 52c56b5c1..83de1c822 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -310,7 +310,8 @@ Feature: Various utility commands. # https://github.com/qutebrowser/qutebrowser/issues/2513 Scenario: Opening link with qute:help - When I run :tab-only + When the documentation is up to date + And I run :tab-only And I open qute:help without waiting And I wait for "Changing title for idx 0 to 'qutebrowser help'" in the log And I hint with args "links normal" and follow a diff --git a/tests/end2end/features/test_misc_bdd.py b/tests/end2end/features/test_misc_bdd.py index 177f7f383..9f7ce63e6 100644 --- a/tests/end2end/features/test_misc_bdd.py +++ b/tests/end2end/features/test_misc_bdd.py @@ -38,11 +38,13 @@ def update_documentation(): doc_path = os.path.join(base_path, 'html', 'doc') script_path = os.path.join(base_path, '..', 'scripts') - if not os.path.exists(doc_path): - # On CI, we can test this without actually building the docs - return + try: + os.mkdir(doc_path) + except FileExistsError: + pass - if all(docutils.docs_up_to_date(p) for p in os.listdir(doc_path)): + files = os.listdir(doc_path) + if files and all(docutils.docs_up_to_date(p) for p in files): return try: