| Conditions | 2 |
| Total Lines | 15 |
| Lines | 15 |
| Ratio | 100 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | import os |
||
| 35 | View Code Duplication | 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 |