| @@ 35-49 (lines=15) @@ | ||
| 32 | runner.invoke(app.commands.get("doc").click_command, input="x") |
|
| 33 | ||
| 34 | ||
| 35 | def test_plugin_store_docs(basicApp, tmpdir): |
|
| 36 | app = basicApp |
|
| 37 | plugin = GwDocumentsInfo(app) |
|
| 38 | plugin.activate() |
|
| 39 | ||
| 40 | output_folder = str(tmpdir.mkdir("output")) |
|
| 41 | ||
| 42 | runner = CliRunner() |
|
| 43 | runner.invoke(app.commands.get("doc_write").click_command, [output_folder], input="Y") |
|
| 44 | ||
| 45 | runner.invoke(app.commands.get("doc_write").click_command, ["not_existing"]) |
|
| 46 | ||
| 47 | with open(os.path.join(output_folder, "test_file.txt"), "w") as file: |
|
| 48 | file.write("content") |
|
| 49 | runner.invoke(app.commands.get("doc_write").click_command, [output_folder]) |
|
| 50 | ||
| @@ 27-41 (lines=15) @@ | ||
| 24 | runner.invoke(app.commands.get("recipe_list").click_command) |
|
| 25 | ||
| 26 | ||
| 27 | def test_plugin_build_recipes(emptyApp, tmpdir): |
|
| 28 | app = emptyApp |
|
| 29 | plugin = GwRecipesBuilder(app) |
|
| 30 | plugin.activate() |
|
| 31 | ||
| 32 | output_folder = str(tmpdir.mkdir("output")) |
|
| 33 | old_path = os.getcwd() |
|
| 34 | os.chdir(output_folder) |
|
| 35 | ||
| 36 | runner = CliRunner() |
|
| 37 | runner.invoke(app.commands.get("recipe_build").click_command, ["gw_package"]) |
|
| 38 | ||
| 39 | os.chdir(old_path) |
|
| 40 | ||
| 41 | runner.invoke(app.commands.get("recipe_build").click_command, ["not_existing"]) |
|
| 42 | ||