From e6e842e5c94d2a8ac8390fda560c9142338d89b8 Mon Sep 17 00:00:00 2001 From: Artem Veremey Date: Fri, 26 Feb 2021 21:53:33 -0800 Subject: [PATCH] Adding a testing framework - pytest --- gamestonk_terminal/tests/__init__.py | 0 .../tests/test_discovery_fidelity_api.py | 13 +++++++++++++ .../tests/test_discovery_short_interest_api.py | 13 +++++++++++++ requirements.txt | 1 + 4 files changed, 27 insertions(+) create mode 100755 gamestonk_terminal/tests/__init__.py create mode 100755 gamestonk_terminal/tests/test_discovery_fidelity_api.py create mode 100755 gamestonk_terminal/tests/test_discovery_short_interest_api.py diff --git a/gamestonk_terminal/tests/__init__.py b/gamestonk_terminal/tests/__init__.py new file mode 100755 index 00000000000..e69de29bb2d diff --git a/gamestonk_terminal/tests/test_discovery_fidelity_api.py b/gamestonk_terminal/tests/test_discovery_fidelity_api.py new file mode 100755 index 00000000000..0f9f7e8fad6 --- /dev/null +++ b/gamestonk_terminal/tests/test_discovery_fidelity_api.py @@ -0,0 +1,13 @@ +""" CLI tests """ +# noqa: F401 +import unittest + +# pylint: disable=unused-import +import pytest + +from gamestonk_terminal.discovery.fidelity_api import orders + + +class TestCLI(unittest.TestCase): + def test_orders(self): + orders([]) diff --git a/gamestonk_terminal/tests/test_discovery_short_interest_api.py b/gamestonk_terminal/tests/test_discovery_short_interest_api.py new file mode 100755 index 00000000000..30799c733c9 --- /dev/null +++ b/gamestonk_terminal/tests/test_discovery_short_interest_api.py @@ -0,0 +1,13 @@ +""" CLI tests """ +# noqa: F401 +import unittest + +# pylint: disable=unused-import +import pytest + +from gamestonk_terminal.discovery.short_interest_api import high_short_interest + + +class TestCLI(unittest.TestCase): + def test_high_short_interest(self): + high_short_interest(["-n", "10"]) diff --git a/requirements.txt b/requirements.txt index 7b3217d8cc0..bccc938d1cc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -131,3 +131,4 @@ fbprophet levenshtein black pylint +pytest