From a3d337f98bc6640e136ae130011014f097c60690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Dec 2019 15:35:53 +0100 Subject: [PATCH] :white_check_mark: Add first test, scaffold testing --- tests/__init__.py | 0 tests/test_tutorial/__init__.py | 0 tests/test_tutorial/test_first_steps/__init__.py | 0 .../test_first_steps/test_tutorial001.py | 13 +++++++++++++ 4 files changed, 13 insertions(+) create mode 100644 tests/__init__.py create mode 100644 tests/test_tutorial/__init__.py create mode 100644 tests/test_tutorial/test_first_steps/__init__.py create mode 100644 tests/test_tutorial/test_first_steps/test_tutorial001.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_tutorial/__init__.py b/tests/test_tutorial/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_tutorial/test_first_steps/__init__.py b/tests/test_tutorial/test_first_steps/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_tutorial/test_first_steps/test_tutorial001.py b/tests/test_tutorial/test_first_steps/test_tutorial001.py new file mode 100644 index 0000000..3c7c78d --- /dev/null +++ b/tests/test_tutorial/test_first_steps/test_tutorial001.py @@ -0,0 +1,13 @@ +from typer.testing import CliRunner +import typer + +from first_steps.tutorial001 import main + +runner = CliRunner() + + +def test_cli(): + app = typer.Typer() + app.command()(main) + result = runner.invoke(app, []) + assert result.output == "Hello World\n"