From ced9d47af63a0c99cf9a1430d9e7eab0af6b5d87 Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Mon, 20 Jun 2022 17:12:58 +0100 Subject: [PATCH 01/11] switch auto print_help on exits --- openbb_terminal/feature_flags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbb_terminal/feature_flags.py b/openbb_terminal/feature_flags.py index 3e6fac51918a..7ebbcda9c8d3 100644 --- a/openbb_terminal/feature_flags.py +++ b/openbb_terminal/feature_flags.py @@ -71,7 +71,7 @@ OPEN_REPORT_AS_HTML = strtobool(os.getenv("OPENBB_OPEN_REPORT_AS_HTML", "True")) # Enable auto print_help when exiting menus -ENABLE_EXIT_AUTO_HELP = strtobool(os.getenv("OPENBB_ENABLE_EXIT_AUTO_HELP", "False")) +ENABLE_EXIT_AUTO_HELP = strtobool(os.getenv("OPENBB_ENABLE_EXIT_AUTO_HELP", "True")) # Remember contexts during session REMEMBER_CONTEXTS = strtobool(os.getenv("OPENBB_REMEMBER_CONTEXTS", "True")) From 9919e6fee015fa9d3fbc4d5d346a87f7bf2ecbb5 Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Mon, 20 Jun 2022 17:59:08 +0100 Subject: [PATCH 02/11] display help when home called from home directory --- openbb_terminal/parent_classes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openbb_terminal/parent_classes.py b/openbb_terminal/parent_classes.py index 481447865578..a5f9b7b19848 100644 --- a/openbb_terminal/parent_classes.py +++ b/openbb_terminal/parent_classes.py @@ -264,7 +264,8 @@ def call_cls(self, _) -> None: def call_home(self, _) -> None: """Process home command""" self.save_class() - console.print("") + if self.PATH.count("/") == 1 and obbff.ENABLE_EXIT_AUTO_HELP: + self.print_help() for _ in range(self.PATH.count("/") - 1): self.queue.insert(0, "quit") From f2e6bc326a23e855d2ed5660423551ba489714ff Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Tue, 21 Jun 2022 15:17:08 +0100 Subject: [PATCH 03/11] change in test to expect help cmd --- openbb_terminal/parent_classes.py | 1 + .../stocks/options/test_screener_controller.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openbb_terminal/parent_classes.py b/openbb_terminal/parent_classes.py index a5f9b7b19848..13d739927a40 100644 --- a/openbb_terminal/parent_classes.py +++ b/openbb_terminal/parent_classes.py @@ -264,6 +264,7 @@ def call_cls(self, _) -> None: def call_home(self, _) -> None: """Process home command""" self.save_class() + console.print("") if self.PATH.count("/") == 1 and obbff.ENABLE_EXIT_AUTO_HELP: self.print_help() for _ in range(self.PATH.count("/") - 1): diff --git a/tests/openbb_terminal/stocks/options/test_screener_controller.py b/tests/openbb_terminal/stocks/options/test_screener_controller.py index 7af462c05acb..583dbf3cb80e 100644 --- a/tests/openbb_terminal/stocks/options/test_screener_controller.py +++ b/tests/openbb_terminal/stocks/options/test_screener_controller.py @@ -112,8 +112,8 @@ def __call__(self, *args, **kwargs): ) result_menu = screener_controller.ScreenerController(queue=None).menu() - - assert result_menu == [] + + assert result_menu == ['help'] @pytest.mark.vcr(record_mode="none") From 308360d267a7280ca5daca41015b4c9fb2562f13 Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Tue, 21 Jun 2022 16:12:32 +0100 Subject: [PATCH 04/11] change in test to expect help cmd --- .../stocks/options/test_screener_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/openbb_terminal/stocks/options/test_screener_controller.py b/tests/openbb_terminal/stocks/options/test_screener_controller.py index 583dbf3cb80e..84ce8477da2c 100644 --- a/tests/openbb_terminal/stocks/options/test_screener_controller.py +++ b/tests/openbb_terminal/stocks/options/test_screener_controller.py @@ -112,8 +112,8 @@ def __call__(self, *args, **kwargs): ) result_menu = screener_controller.ScreenerController(queue=None).menu() - - assert result_menu == ['help'] + + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") From d823d72b27b1846d49847c6519b40f4cc38e6b0a Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Tue, 21 Jun 2022 16:52:45 +0100 Subject: [PATCH 05/11] sets autoexithelp flag on conftest --- tests/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 64207127fd5f..e6ca2d5d82bb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -16,6 +16,7 @@ # IMPORTATION INTERNAL from openbb_terminal import decorators, helper_funcs +from openbb_terminal import feature_flags as obbff # pylint: disable=redefined-outer-name @@ -31,7 +32,7 @@ os.environ["OPENBB_IMG_HOST_ACTIVE"] = "False" os.environ["OPENBB_DISCORD_BOT_TOKEN"] = "123" os.environ["OPENBB_IMGUR_CLIENT_ID"] = "123" - +obbff.ENABLE_EXIT_AUTO_HELP = True class Record: @staticmethod From b58c802a4439d56c0f4923c62030446261e2a05f Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Wed, 22 Jun 2022 10:43:50 +0100 Subject: [PATCH 06/11] supress help string print on quit --- openbb_terminal/parent_classes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openbb_terminal/parent_classes.py b/openbb_terminal/parent_classes.py index 13d739927a40..b34046f3c46a 100644 --- a/openbb_terminal/parent_classes.py +++ b/openbb_terminal/parent_classes.py @@ -514,6 +514,7 @@ def menu(self, custom_path_menu_above: str = ""): if ( an_input and an_input != "home" + and an_input != "help" and an_input.split(" ")[0] in self.controller_choices ): console.print(f"{get_flair()} {self.PATH} $ {an_input}") From aa5f9fe1f0547071fdd5dad6954304de7f6140d4 Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Wed, 22 Jun 2022 10:44:50 +0100 Subject: [PATCH 07/11] adapt tests to expect help --- .../alternative/covid/test_covid_controller.py | 6 +++--- .../openbb_terminal/alternative/oss/test_oss_controller.py | 6 +++--- tests/openbb_terminal/alternative/test_alt_controller.py | 6 +++--- .../cryptocurrency/defi/test_defi_controller.py | 6 +++--- .../cryptocurrency/discovery/test_discovery_controller.py | 6 +++--- .../cryptocurrency/due_diligence/test_dd_controller.py | 6 +++--- .../cryptocurrency/nft/test_nft_controller.py | 6 +++--- .../cryptocurrency/onchain/test_onchain_controller.py | 6 +++--- .../cryptocurrency/overview/test_overview_controller.py | 4 ++-- .../cryptocurrency/test_crypto_controller.py | 6 +++--- .../cryptocurrency/tools/test_tools_controller.py | 6 +++--- tests/openbb_terminal/economy/test_economy_controller.py | 6 +++--- tests/openbb_terminal/etf/discovery/test_disc_controller.py | 6 +++--- .../etf/prediction_techniques/test_pred_controller.py | 4 ++-- .../etf/screener/test_screener_controller.py | 6 +++--- .../etf/technical_analysis/test_ta_controller.py | 6 +++--- tests/openbb_terminal/etf/test_etf_controller.py | 6 +++--- .../forex/quantitative_analysis/test_qa_controller.py | 6 +++--- .../forex/technical_analysis/test_ta_controller.py | 6 +++--- tests/openbb_terminal/forex/test_forex_controller.py | 6 +++--- .../portfolio/brokers/coinbase/test_coinbase_controller.py | 2 +- .../portfolio/brokers/degiro/test_degiro_controller.py | 6 +++--- .../portfolio/portfolio_analysis/test_pa_controller.py | 6 +++--- .../portfolio/portfolio_optimization/test_po_controller.py | 6 +++--- .../openbb_terminal/portfolio/test_portfolio_controller.py | 6 +++--- .../stocks/backtesting/test_bt_controller.py | 4 ++-- .../stocks/behavioural_analysis/test_ba_controller.py | 6 +++--- .../stocks/comparison_analysis/test_ca_controller.py | 4 ++-- .../stocks/dark_pool_shorts/test_dps_controller.py | 6 +++--- .../stocks/discovery/test_disc_controller.py | 6 +++--- .../stocks/due_diligence/test_dd_controller.py | 6 +++--- .../financial_modeling_prep/test_fmp_controller.py | 4 ++-- .../stocks/fundamental_analysis/test_fa_controller.py | 6 +++--- .../stocks/government/test_gov_controller.py | 6 +++--- .../stocks/insider/test_insider_controller.py | 6 +++--- .../stocks/options/test_options_controller.py | 6 +++--- .../stocks/options/test_pricing_controller.py | 6 +++--- .../stocks/options/test_screener_controller.py | 4 ++-- .../stocks/prediction_techniques/test_pred_controller.py | 4 ++-- .../stocks/quantitative_analysis/test_qa_controller.py | 6 +++--- .../openbb_terminal/stocks/research/test_res_controller.py | 6 +++--- .../stocks/screener/test_screener_controller.py | 6 +++--- .../stocks/sector_industry_analysis/test_sia_controller.py | 6 +++--- .../stocks/technical_analysis/test_ta_controller.py | 6 +++--- tests/openbb_terminal/stocks/test_stocks_controller.py | 6 +++--- 45 files changed, 126 insertions(+), 126 deletions(-) diff --git a/tests/openbb_terminal/alternative/covid/test_covid_controller.py b/tests/openbb_terminal/alternative/covid/test_covid_controller.py index e6335db54758..ebda8d352a86 100644 --- a/tests/openbb_terminal/alternative/covid/test_covid_controller.py +++ b/tests/openbb_terminal/alternative/covid/test_covid_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = covid_controller.CovidController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = covid_controller.CovidController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/alternative/oss/test_oss_controller.py b/tests/openbb_terminal/alternative/oss/test_oss_controller.py index dad4e02dceb1..e1ae9ec451b1 100644 --- a/tests/openbb_terminal/alternative/oss/test_oss_controller.py +++ b/tests/openbb_terminal/alternative/oss/test_oss_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = oss_controller.OSSController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = oss_controller.OSSController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/alternative/test_alt_controller.py b/tests/openbb_terminal/alternative/test_alt_controller.py index 83e4819407d7..599f10cf6c70 100644 --- a/tests/openbb_terminal/alternative/test_alt_controller.py +++ b/tests/openbb_terminal/alternative/test_alt_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = alt_controller.AlternativeDataController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = alt_controller.AlternativeDataController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/cryptocurrency/defi/test_defi_controller.py b/tests/openbb_terminal/cryptocurrency/defi/test_defi_controller.py index 8dd077b7e6dc..63a3234c7130 100644 --- a/tests/openbb_terminal/cryptocurrency/defi/test_defi_controller.py +++ b/tests/openbb_terminal/cryptocurrency/defi/test_defi_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = defi_controller.DefiController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = defi_controller.DefiController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/cryptocurrency/discovery/test_discovery_controller.py b/tests/openbb_terminal/cryptocurrency/discovery/test_discovery_controller.py index 8432341d35d3..a9a443521ad4 100644 --- a/tests/openbb_terminal/cryptocurrency/discovery/test_discovery_controller.py +++ b/tests/openbb_terminal/cryptocurrency/discovery/test_discovery_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = discovery_controller.DiscoveryController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = discovery_controller.DiscoveryController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/cryptocurrency/due_diligence/test_dd_controller.py b/tests/openbb_terminal/cryptocurrency/due_diligence/test_dd_controller.py index 69ff4b2e289e..3886c2fa1c30 100644 --- a/tests/openbb_terminal/cryptocurrency/due_diligence/test_dd_controller.py +++ b/tests/openbb_terminal/cryptocurrency/due_diligence/test_dd_controller.py @@ -54,7 +54,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -114,7 +114,7 @@ def test_menu_without_queue_completion(mocker): result_menu = dd_controller.DueDiligenceController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -164,7 +164,7 @@ def __call__(self, *args, **kwargs): result_menu = dd_controller.DueDiligenceController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/cryptocurrency/nft/test_nft_controller.py b/tests/openbb_terminal/cryptocurrency/nft/test_nft_controller.py index 1f053ce91313..d7a3f5a94dcc 100644 --- a/tests/openbb_terminal/cryptocurrency/nft/test_nft_controller.py +++ b/tests/openbb_terminal/cryptocurrency/nft/test_nft_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = nft_controller.NFTController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = nft_controller.NFTController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/cryptocurrency/onchain/test_onchain_controller.py b/tests/openbb_terminal/cryptocurrency/onchain/test_onchain_controller.py index 3f57d47e3394..49d061caa2ec 100644 --- a/tests/openbb_terminal/cryptocurrency/onchain/test_onchain_controller.py +++ b/tests/openbb_terminal/cryptocurrency/onchain/test_onchain_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = onchain_controller.OnchainController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = onchain_controller.OnchainController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/cryptocurrency/overview/test_overview_controller.py b/tests/openbb_terminal/cryptocurrency/overview/test_overview_controller.py index bc69c022cf43..4bc686006a17 100644 --- a/tests/openbb_terminal/cryptocurrency/overview/test_overview_controller.py +++ b/tests/openbb_terminal/cryptocurrency/overview/test_overview_controller.py @@ -100,7 +100,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -158,7 +158,7 @@ def __call__(self, *args, **kwargs): result_menu = overview_controller.OverviewController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/cryptocurrency/test_crypto_controller.py b/tests/openbb_terminal/cryptocurrency/test_crypto_controller.py index 26eae6524222..a17f530eef94 100644 --- a/tests/openbb_terminal/cryptocurrency/test_crypto_controller.py +++ b/tests/openbb_terminal/cryptocurrency/test_crypto_controller.py @@ -61,7 +61,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -111,7 +111,7 @@ def test_menu_without_queue_completion(mocker): result_menu = crypto_controller.CryptoController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -155,7 +155,7 @@ def __call__(self, *args, **kwargs): result_menu = crypto_controller.CryptoController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/cryptocurrency/tools/test_tools_controller.py b/tests/openbb_terminal/cryptocurrency/tools/test_tools_controller.py index 5d9b90d234ef..5ea27e313f7a 100644 --- a/tests/openbb_terminal/cryptocurrency/tools/test_tools_controller.py +++ b/tests/openbb_terminal/cryptocurrency/tools/test_tools_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = tools_controller.ToolsController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = tools_controller.ToolsController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/economy/test_economy_controller.py b/tests/openbb_terminal/economy/test_economy_controller.py index 98adf47dc566..a8de84576ac2 100644 --- a/tests/openbb_terminal/economy/test_economy_controller.py +++ b/tests/openbb_terminal/economy/test_economy_controller.py @@ -17,7 +17,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -67,7 +67,7 @@ def test_menu_without_queue_completion(mocker): result_menu = economy_controller.EconomyController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -111,7 +111,7 @@ def __call__(self, *args, **kwargs): result_menu = economy_controller.EconomyController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/etf/discovery/test_disc_controller.py b/tests/openbb_terminal/etf/discovery/test_disc_controller.py index ffa0c0135a8f..7d4ca5775c6a 100644 --- a/tests/openbb_terminal/etf/discovery/test_disc_controller.py +++ b/tests/openbb_terminal/etf/discovery/test_disc_controller.py @@ -19,7 +19,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -73,7 +73,7 @@ def test_menu_without_queue_completion(mocker): result_menu = disc_controller.DiscoveryController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -117,7 +117,7 @@ def __call__(self, *args, **kwargs): result_menu = disc_controller.DiscoveryController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/etf/prediction_techniques/test_pred_controller.py b/tests/openbb_terminal/etf/prediction_techniques/test_pred_controller.py index 86880b17ddff..641ef3db2b7c 100644 --- a/tests/openbb_terminal/etf/prediction_techniques/test_pred_controller.py +++ b/tests/openbb_terminal/etf/prediction_techniques/test_pred_controller.py @@ -119,7 +119,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -170,7 +170,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/etf/screener/test_screener_controller.py b/tests/openbb_terminal/etf/screener/test_screener_controller.py index 5a5e606cdd25..7e4b72c64b4c 100644 --- a/tests/openbb_terminal/etf/screener/test_screener_controller.py +++ b/tests/openbb_terminal/etf/screener/test_screener_controller.py @@ -19,7 +19,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -73,7 +73,7 @@ def test_menu_without_queue_completion(mocker): result_menu = screener_controller.ScreenerController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -117,7 +117,7 @@ def __call__(self, *args, **kwargs): result_menu = screener_controller.ScreenerController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/etf/technical_analysis/test_ta_controller.py b/tests/openbb_terminal/etf/technical_analysis/test_ta_controller.py index fd0006bc28ab..01e832d3ceb3 100644 --- a/tests/openbb_terminal/etf/technical_analysis/test_ta_controller.py +++ b/tests/openbb_terminal/etf/technical_analysis/test_ta_controller.py @@ -25,7 +25,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -88,7 +88,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -137,7 +137,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/etf/test_etf_controller.py b/tests/openbb_terminal/etf/test_etf_controller.py index 8e56cb5a8405..b21d33144e2f 100644 --- a/tests/openbb_terminal/etf/test_etf_controller.py +++ b/tests/openbb_terminal/etf/test_etf_controller.py @@ -59,7 +59,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -109,7 +109,7 @@ def test_menu_without_queue_completion(mocker): result_menu = etf_controller.ETFController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -153,7 +153,7 @@ def __call__(self, *args, **kwargs): result_menu = etf_controller.ETFController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/forex/quantitative_analysis/test_qa_controller.py b/tests/openbb_terminal/forex/quantitative_analysis/test_qa_controller.py index e022c5a81f40..0771aa841d6e 100644 --- a/tests/openbb_terminal/forex/quantitative_analysis/test_qa_controller.py +++ b/tests/openbb_terminal/forex/quantitative_analysis/test_qa_controller.py @@ -60,7 +60,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -118,7 +118,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -168,7 +168,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/forex/technical_analysis/test_ta_controller.py b/tests/openbb_terminal/forex/technical_analysis/test_ta_controller.py index 4eb808ae4f2f..74d2c8aa5bd4 100644 --- a/tests/openbb_terminal/forex/technical_analysis/test_ta_controller.py +++ b/tests/openbb_terminal/forex/technical_analysis/test_ta_controller.py @@ -36,7 +36,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -103,7 +103,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -154,7 +154,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/forex/test_forex_controller.py b/tests/openbb_terminal/forex/test_forex_controller.py index d93f85a650a9..baaa0115756b 100644 --- a/tests/openbb_terminal/forex/test_forex_controller.py +++ b/tests/openbb_terminal/forex/test_forex_controller.py @@ -46,7 +46,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -96,7 +96,7 @@ def test_menu_without_queue_completion(mocker): result_menu = forex_controller.ForexController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -140,7 +140,7 @@ def __call__(self, *args, **kwargs): result_menu = forex_controller.ForexController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/portfolio/brokers/coinbase/test_coinbase_controller.py b/tests/openbb_terminal/portfolio/brokers/coinbase/test_coinbase_controller.py index 31ae86899123..46978825613b 100644 --- a/tests/openbb_terminal/portfolio/brokers/coinbase/test_coinbase_controller.py +++ b/tests/openbb_terminal/portfolio/brokers/coinbase/test_coinbase_controller.py @@ -6,7 +6,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) diff --git a/tests/openbb_terminal/portfolio/brokers/degiro/test_degiro_controller.py b/tests/openbb_terminal/portfolio/brokers/degiro/test_degiro_controller.py index ce37f7cbe865..ccb6a6d0c903 100644 --- a/tests/openbb_terminal/portfolio/brokers/degiro/test_degiro_controller.py +++ b/tests/openbb_terminal/portfolio/brokers/degiro/test_degiro_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = degiro_controller.DegiroController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = degiro_controller.DegiroController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/portfolio/portfolio_analysis/test_pa_controller.py b/tests/openbb_terminal/portfolio/portfolio_analysis/test_pa_controller.py index 0f3fc2ddf4a0..c81244eb5b87 100644 --- a/tests/openbb_terminal/portfolio/portfolio_analysis/test_pa_controller.py +++ b/tests/openbb_terminal/portfolio/portfolio_analysis/test_pa_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = pa_controller.PortfolioAnalysisController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = pa_controller.PortfolioAnalysisController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/portfolio/portfolio_optimization/test_po_controller.py b/tests/openbb_terminal/portfolio/portfolio_optimization/test_po_controller.py index 0d2a7b3138f7..16321f33ba74 100644 --- a/tests/openbb_terminal/portfolio/portfolio_optimization/test_po_controller.py +++ b/tests/openbb_terminal/portfolio/portfolio_optimization/test_po_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = po_controller.PortfolioOptimizationController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = po_controller.PortfolioOptimizationController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/portfolio/test_portfolio_controller.py b/tests/openbb_terminal/portfolio/test_portfolio_controller.py index b4a83898fb51..142a1c648790 100644 --- a/tests/openbb_terminal/portfolio/test_portfolio_controller.py +++ b/tests/openbb_terminal/portfolio/test_portfolio_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = portfolio_controller.PortfolioController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -110,7 +110,7 @@ def __call__(self, *args, **kwargs): result_menu = portfolio_controller.PortfolioController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/backtesting/test_bt_controller.py b/tests/openbb_terminal/stocks/backtesting/test_bt_controller.py index 4c5a9949d6e8..03f8dc02396e 100644 --- a/tests/openbb_terminal/stocks/backtesting/test_bt_controller.py +++ b/tests/openbb_terminal/stocks/backtesting/test_bt_controller.py @@ -75,7 +75,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -124,7 +124,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/behavioural_analysis/test_ba_controller.py b/tests/openbb_terminal/stocks/behavioural_analysis/test_ba_controller.py index b828ebdeb39c..e9c45f54cbd0 100644 --- a/tests/openbb_terminal/stocks/behavioural_analysis/test_ba_controller.py +++ b/tests/openbb_terminal/stocks/behavioural_analysis/test_ba_controller.py @@ -32,7 +32,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -88,7 +88,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -137,7 +137,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/comparison_analysis/test_ca_controller.py b/tests/openbb_terminal/stocks/comparison_analysis/test_ca_controller.py index ddf7944f3e0f..9704a93f2ec4 100644 --- a/tests/openbb_terminal/stocks/comparison_analysis/test_ca_controller.py +++ b/tests/openbb_terminal/stocks/comparison_analysis/test_ca_controller.py @@ -72,7 +72,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -120,7 +120,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/dark_pool_shorts/test_dps_controller.py b/tests/openbb_terminal/stocks/dark_pool_shorts/test_dps_controller.py index a9bb560f8dc3..ecf728295757 100644 --- a/tests/openbb_terminal/stocks/dark_pool_shorts/test_dps_controller.py +++ b/tests/openbb_terminal/stocks/dark_pool_shorts/test_dps_controller.py @@ -32,7 +32,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -90,7 +90,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -140,7 +140,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/discovery/test_disc_controller.py b/tests/openbb_terminal/stocks/discovery/test_disc_controller.py index 6a8bdb5116ad..56fd94526204 100644 --- a/tests/openbb_terminal/stocks/discovery/test_disc_controller.py +++ b/tests/openbb_terminal/stocks/discovery/test_disc_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -66,7 +66,7 @@ def test_menu_without_queue_completion(mocker): result_menu = disc_controller.DiscoveryController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -111,7 +111,7 @@ def __call__(self, *args, **kwargs): result_menu = disc_controller.DiscoveryController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/due_diligence/test_dd_controller.py b/tests/openbb_terminal/stocks/due_diligence/test_dd_controller.py index 4736d1bf33ac..ba3b174c3593 100644 --- a/tests/openbb_terminal/stocks/due_diligence/test_dd_controller.py +++ b/tests/openbb_terminal/stocks/due_diligence/test_dd_controller.py @@ -17,7 +17,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -75,7 +75,7 @@ def test_menu_without_queue_completion(mocker): ticker="TSLA", start="10/25/2021", interval="1440min", stock=stock, queue=None ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -123,7 +123,7 @@ def __call__(self, *args, **kwargs): ticker="TSLA", start="10/25/2021", interval="1440min", stock=stock, queue=None ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/fundamental_analysis/financial_modeling_prep/test_fmp_controller.py b/tests/openbb_terminal/stocks/fundamental_analysis/financial_modeling_prep/test_fmp_controller.py index bc6f1d4c7621..70258cca7a47 100644 --- a/tests/openbb_terminal/stocks/fundamental_analysis/financial_modeling_prep/test_fmp_controller.py +++ b/tests/openbb_terminal/stocks/fundamental_analysis/financial_modeling_prep/test_fmp_controller.py @@ -72,7 +72,7 @@ def test_menu_without_queue_completion(mocker): ticker="TSLA", start="10/25/2021", interval="1440min", queue=None ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -118,7 +118,7 @@ def __call__(self, *args, **kwargs): ticker="TSLA", start="10/25/2021", interval="1440min", queue=None ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/fundamental_analysis/test_fa_controller.py b/tests/openbb_terminal/stocks/fundamental_analysis/test_fa_controller.py index 0ddadcbc5920..02ff86118211 100644 --- a/tests/openbb_terminal/stocks/fundamental_analysis/test_fa_controller.py +++ b/tests/openbb_terminal/stocks/fundamental_analysis/test_fa_controller.py @@ -16,7 +16,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -72,7 +72,7 @@ def test_menu_without_queue_completion(mocker): ticker="TSLA", start="10/25/2021", interval="1440min", suffix="", queue=None ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -119,7 +119,7 @@ def __call__(self, *args, **kwargs): ticker="TSLA", start="10/25/2021", interval="1440min", suffix="", queue=None ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/government/test_gov_controller.py b/tests/openbb_terminal/stocks/government/test_gov_controller.py index 31b5f6361f11..00538740662e 100644 --- a/tests/openbb_terminal/stocks/government/test_gov_controller.py +++ b/tests/openbb_terminal/stocks/government/test_gov_controller.py @@ -28,7 +28,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -81,7 +81,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -128,7 +128,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/insider/test_insider_controller.py b/tests/openbb_terminal/stocks/insider/test_insider_controller.py index f04d0467b7a7..e802fd00334f 100644 --- a/tests/openbb_terminal/stocks/insider/test_insider_controller.py +++ b/tests/openbb_terminal/stocks/insider/test_insider_controller.py @@ -58,7 +58,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -120,7 +120,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -172,7 +172,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/options/test_options_controller.py b/tests/openbb_terminal/stocks/options/test_options_controller.py index 23f3d41b1ab0..f8038ff6413c 100644 --- a/tests/openbb_terminal/stocks/options/test_options_controller.py +++ b/tests/openbb_terminal/stocks/options/test_options_controller.py @@ -97,7 +97,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -187,7 +187,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -248,7 +248,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/options/test_pricing_controller.py b/tests/openbb_terminal/stocks/options/test_pricing_controller.py index 451c20388d7b..fe189a34257c 100644 --- a/tests/openbb_terminal/stocks/options/test_pricing_controller.py +++ b/tests/openbb_terminal/stocks/options/test_pricing_controller.py @@ -19,7 +19,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -79,7 +79,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -128,7 +128,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/options/test_screener_controller.py b/tests/openbb_terminal/stocks/options/test_screener_controller.py index 84ce8477da2c..bfed63c13908 100644 --- a/tests/openbb_terminal/stocks/options/test_screener_controller.py +++ b/tests/openbb_terminal/stocks/options/test_screener_controller.py @@ -19,7 +19,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -69,7 +69,7 @@ def test_menu_without_queue_completion(mocker): result_menu = screener_controller.ScreenerController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/prediction_techniques/test_pred_controller.py b/tests/openbb_terminal/stocks/prediction_techniques/test_pred_controller.py index 50553aac8985..3f13cc61dde2 100644 --- a/tests/openbb_terminal/stocks/prediction_techniques/test_pred_controller.py +++ b/tests/openbb_terminal/stocks/prediction_techniques/test_pred_controller.py @@ -119,7 +119,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -170,7 +170,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/quantitative_analysis/test_qa_controller.py b/tests/openbb_terminal/stocks/quantitative_analysis/test_qa_controller.py index 7f02e881b2d8..11c64f76a3dc 100644 --- a/tests/openbb_terminal/stocks/quantitative_analysis/test_qa_controller.py +++ b/tests/openbb_terminal/stocks/quantitative_analysis/test_qa_controller.py @@ -66,7 +66,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -126,7 +126,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -177,7 +177,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/research/test_res_controller.py b/tests/openbb_terminal/stocks/research/test_res_controller.py index dd4e865a7557..2e1e137b65a7 100644 --- a/tests/openbb_terminal/stocks/research/test_res_controller.py +++ b/tests/openbb_terminal/stocks/research/test_res_controller.py @@ -20,7 +20,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -80,7 +80,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -129,7 +129,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/screener/test_screener_controller.py b/tests/openbb_terminal/stocks/screener/test_screener_controller.py index d85ce0225111..3971d5282153 100644 --- a/tests/openbb_terminal/stocks/screener/test_screener_controller.py +++ b/tests/openbb_terminal/stocks/screener/test_screener_controller.py @@ -20,7 +20,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -70,7 +70,7 @@ def test_menu_without_queue_completion(mocker): result_menu = screener_controller.ScreenerController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -114,7 +114,7 @@ def __call__(self, *args, **kwargs): result_menu = screener_controller.ScreenerController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/sector_industry_analysis/test_sia_controller.py b/tests/openbb_terminal/stocks/sector_industry_analysis/test_sia_controller.py index ba9c877149db..0b949901892b 100644 --- a/tests/openbb_terminal/stocks/sector_industry_analysis/test_sia_controller.py +++ b/tests/openbb_terminal/stocks/sector_industry_analysis/test_sia_controller.py @@ -57,7 +57,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -111,7 +111,7 @@ def test_menu_without_queue_completion(mocker): ticker=None, queue=None ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -157,7 +157,7 @@ def __call__(self, *args, **kwargs): ticker=None, queue=None ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/technical_analysis/test_ta_controller.py b/tests/openbb_terminal/stocks/technical_analysis/test_ta_controller.py index 463111402a7b..626faee34709 100644 --- a/tests/openbb_terminal/stocks/technical_analysis/test_ta_controller.py +++ b/tests/openbb_terminal/stocks/technical_analysis/test_ta_controller.py @@ -36,7 +36,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -101,7 +101,7 @@ def test_menu_without_queue_completion(mocker): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -151,7 +151,7 @@ def __call__(self, *args, **kwargs): queue=None, ).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") diff --git a/tests/openbb_terminal/stocks/test_stocks_controller.py b/tests/openbb_terminal/stocks/test_stocks_controller.py index 76f278dd54f7..f520aac70684 100644 --- a/tests/openbb_terminal/stocks/test_stocks_controller.py +++ b/tests/openbb_terminal/stocks/test_stocks_controller.py @@ -58,7 +58,7 @@ def vcr_config(): @pytest.mark.parametrize( "queue, expected", [ - (["load", "help"], []), + (["load", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) @@ -108,7 +108,7 @@ def test_menu_without_queue_completion(mocker): result_menu = stocks_controller.StocksController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") @@ -152,7 +152,7 @@ def __call__(self, *args, **kwargs): result_menu = stocks_controller.StocksController(queue=None).menu() - assert result_menu == [] + assert result_menu == ["help"] @pytest.mark.vcr(record_mode="none") From 7986e32605f22f43c53b80420b6bfb69e754c3ba Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Wed, 22 Jun 2022 11:00:18 +0100 Subject: [PATCH 08/11] adds help on 3 tests missing --- tests/openbb_terminal/stocks/backtesting/test_bt_controller.py | 2 +- .../stocks/comparison_analysis/test_ca_controller.py | 2 +- .../financial_modeling_prep/test_fmp_controller.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/openbb_terminal/stocks/backtesting/test_bt_controller.py b/tests/openbb_terminal/stocks/backtesting/test_bt_controller.py index 03f8dc02396e..3d7048d947c4 100644 --- a/tests/openbb_terminal/stocks/backtesting/test_bt_controller.py +++ b/tests/openbb_terminal/stocks/backtesting/test_bt_controller.py @@ -19,7 +19,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["ema", "help"], []), + (["ema", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) diff --git a/tests/openbb_terminal/stocks/comparison_analysis/test_ca_controller.py b/tests/openbb_terminal/stocks/comparison_analysis/test_ca_controller.py index 9704a93f2ec4..514b10f3d155 100644 --- a/tests/openbb_terminal/stocks/comparison_analysis/test_ca_controller.py +++ b/tests/openbb_terminal/stocks/comparison_analysis/test_ca_controller.py @@ -18,7 +18,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["historical", "help"], []), + (["historical", "help"], ["help"]), (["q", ".."], [".."]), ], ) diff --git a/tests/openbb_terminal/stocks/fundamental_analysis/financial_modeling_prep/test_fmp_controller.py b/tests/openbb_terminal/stocks/fundamental_analysis/financial_modeling_prep/test_fmp_controller.py index 70258cca7a47..01a2b488b9cb 100644 --- a/tests/openbb_terminal/stocks/fundamental_analysis/financial_modeling_prep/test_fmp_controller.py +++ b/tests/openbb_terminal/stocks/fundamental_analysis/financial_modeling_prep/test_fmp_controller.py @@ -18,7 +18,7 @@ @pytest.mark.parametrize( "queue, expected", [ - (["profile", "help"], []), + (["profile", "help"], ["help"]), (["quit", "help"], ["help"]), ], ) From 08e8e95362c86ce811acfd5b719363e13b7f9ecb Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Wed, 22 Jun 2022 12:33:50 +0100 Subject: [PATCH 09/11] run black --- openbb_terminal/reports/equity.ipynb | 180 ++++++++++++++++++++++----- tests/conftest.py | 1 + 2 files changed, 147 insertions(+), 34 deletions(-) diff --git a/openbb_terminal/reports/equity.ipynb b/openbb_terminal/reports/equity.ipynb index 7c54503a0f30..2f429684191d 100644 --- a/openbb_terminal/reports/equity.ipynb +++ b/openbb_terminal/reports/equity.ipynb @@ -41,7 +41,7 @@ "try:\n", " openbb.stocks.pred.models\n", "except Exception as e:\n", - " predictions = False\n" + " predictions = False" ] }, { @@ -93,6 +93,7 @@ "source": [ "if \".\" in ticker:\n", " import sys\n", + "\n", " sys.exit(0)" ] }, @@ -103,13 +104,15 @@ "metadata": {}, "outputs": [], "source": [ - "ticker_data = openbb.stocks.load(ticker, start=datetime.datetime.now() - datetime.timedelta(days=4*30))\n", + "ticker_data = openbb.stocks.load(\n", + " ticker, start=datetime.datetime.now() - datetime.timedelta(days=4 * 30)\n", + ")\n", "ticker_data = openbb.stocks.process_candle(ticker_data)\n", "\n", "author = \"Didier Rodrigues Lopes\"\n", "report_title = f\"INVESTMENT RESEARCH REPORT ON {ticker.upper()}\"\n", - "report_date = datetime.datetime.now().strftime('%d %B, %Y')\n", - "report_time = datetime.datetime.now().strftime('%H:%M') \n", + "report_date = datetime.datetime.now().strftime(\"%d %B, %Y\")\n", + "report_time = datetime.datetime.now().strftime(\"%H:%M\")\n", "report_timezone = datetime.datetime.now(datetime.timezone.utc).astimezone().tzinfo\n", "report_title, report_date, report_time, report_timezone" ] @@ -351,7 +354,14 @@ "outputs": [], "source": [ "df = openbb.stocks.dd.models.business_insider.get_price_target_from_analysts(ticker)\n", - "avg_ratings_last_30_days = round(np.mean(df[datetime.datetime.now() - datetime.timedelta(days=30):][\"Price Target\"].values), 2)\n", + "avg_ratings_last_30_days = round(\n", + " np.mean(\n", + " df[datetime.datetime.now() - datetime.timedelta(days=30) :][\n", + " \"Price Target\"\n", + " ].values\n", + " ),\n", + " 2,\n", + ")\n", "last_price = round(ticker_data[\"Close\"][-1], 2)" ] }, @@ -411,7 +421,11 @@ "outputs": [], "source": [ "from sklearn.linear_model import LinearRegression\n", - "model = LinearRegression().fit(np.array(range(len(ticker_data[\"Close\"][-30:].index))).reshape(-1,1), ticker_data[\"Close\"][-30:].values)\n", + "\n", + "model = LinearRegression().fit(\n", + " np.array(range(len(ticker_data[\"Close\"][-30:].index))).reshape(-1, 1),\n", + " ticker_data[\"Close\"][-30:].values,\n", + ")\n", "regression_slope = round(model.coef_[0], 2)" ] }, @@ -423,13 +437,18 @@ "outputs": [], "source": [ "import pandas as pd\n", - "df_insider = pd.DataFrame.from_dict(openbb.stocks.ins.models.finviz.get_last_insider_activity(ticker)).head(10)\n", - "df_insider[\"Val ($)\"] = df_insider[\"Value ($)\"].replace({',': ''}, regex=True)\n", + "\n", + "df_insider = pd.DataFrame.from_dict(\n", + " openbb.stocks.ins.models.finviz.get_last_insider_activity(ticker)\n", + ").head(10)\n", + "df_insider[\"Val ($)\"] = df_insider[\"Value ($)\"].replace({\",\": \"\"}, regex=True)\n", "df_insider[\"Trade\"] = df_insider.apply(\n", - " lambda row: (-1*float(row[\"Val ($)\"])) if row[\"Transaction\"] == \"Sale\" else (float(row[\"Val ($)\"]) if row[\"Transaction\"] == \"Buy\" else 0),\n", - " axis=1,\n", - " )\n", - "last_10_insider_trading = round(sum(df_insider[\"Trade\"])/1_000_000, 2)\n", + " lambda row: (-1 * float(row[\"Val ($)\"]))\n", + " if row[\"Transaction\"] == \"Sale\"\n", + " else (float(row[\"Val ($)\"]) if row[\"Transaction\"] == \"Buy\" else 0),\n", + " axis=1,\n", + ")\n", + "last_10_insider_trading = round(sum(df_insider[\"Trade\"]) / 1_000_000, 2)\n", "df_insider = df_insider.drop(columns=[\"Val ($)\", \"Trade\"])\n", "df_insider" ] @@ -467,7 +486,12 @@ "metadata": {}, "outputs": [], "source": [ - "watchlist_count, n_cases, n_bull, n_bear = openbb.stocks.ba.models.stocktwits.get_bullbear(ticker)\n", + "(\n", + " watchlist_count,\n", + " n_cases,\n", + " n_bull,\n", + " n_bear,\n", + ") = openbb.stocks.ba.models.stocktwits.get_bullbear(ticker)\n", "stocktwits_sentiment = f\"Watchlist count: {watchlist_count}
\"\n", "if n_cases > 0:\n", " stocktwits_sentiment += f\"\\nLast {n_cases} sentiment messages:
\"\n", @@ -499,7 +523,9 @@ "metadata": {}, "outputs": [], "source": [ - "ticker_data_all = openbb.stocks.load(ticker, start=datetime.datetime.now() - datetime.timedelta(days=5*12*21))\n", + "ticker_data_all = openbb.stocks.load(\n", + " ticker, start=datetime.datetime.now() - datetime.timedelta(days=5 * 12 * 21)\n", + ")\n", "ticker_data_all[\"Returns\"] = ticker_data_all[\"Adj Close\"].pct_change()" ] }, @@ -541,7 +567,12 @@ "outputs": [], "source": [ "if predictions:\n", - " regression_val = round(openbb.stocks.pred.models.regression.get_regression_model(ticker_data_all[\"Close\"], 1, 80, 20, 1)[0][-1], 2)\n", + " regression_val = round(\n", + " openbb.stocks.pred.models.regression.get_regression_model(\n", + " ticker_data_all[\"Close\"], 1, 80, 20, 1\n", + " )[0][-1],\n", + " 2,\n", + " )\n", " regression_val" ] }, @@ -554,7 +585,9 @@ "source": [ "if predictions:\n", " fig, ax = plt.subplots(figsize=(11, 3), dpi=150)\n", - " openbb.stocks.pred.regression(ticker, ticker_data_all[\"Close\"], 1, 80, 20, 1, external_axes=[ax])\n", + " openbb.stocks.pred.regression(\n", + " ticker, ticker_data_all[\"Close\"], 1, 80, 20, 1, external_axes=[ax]\n", + " )\n", " fig.tight_layout()\n", " f = io.BytesIO()\n", " fig.savefig(f, format=\"svg\")\n", @@ -586,7 +619,9 @@ "source": [ "if predictions:\n", " fig, ax = plt.subplots(figsize=(11, 3), dpi=150)\n", - " openbb.stocks.pred.regression(ticker, ticker_data_all[\"Close\"], 1, 80, 20, 1, external_axes=[ax])\n", + " openbb.stocks.pred.regression(\n", + " ticker, ticker_data_all[\"Close\"], 1, 80, 20, 1, external_axes=[ax]\n", + " )\n", " fig.tight_layout()\n", " f = io.BytesIO()\n", " fig.savefig(f, format=\"svg\")\n", @@ -611,23 +646,85 @@ "body = \"\"\n", "\n", "img = f'\"OpenBB\"'\n", - "body += openbb.widgets.header(img, author, report_date, report_time, report_timezone, f'INVESTMENT RESEARCH REPORT: {ticker}')\n", + "body += openbb.widgets.header(\n", + " img,\n", + " author,\n", + " report_date,\n", + " report_time,\n", + " report_timezone,\n", + " f\"INVESTMENT RESEARCH REPORT: {ticker}\",\n", + ")\n", "\n", - "body += openbb.widgets.tablinks([\"SUMMARY\", \"Overview\", \"Analyst Opinions\", \"Fundamental Analysis\", \"Dark Pool and Shorts\", \"Technical Analysis\", \"Insider Trading\", \"Behavioural Analysis\", \"Quantitative Analysis\", \"Prediction Techniques\"])\n", + "body += openbb.widgets.tablinks(\n", + " [\n", + " \"SUMMARY\",\n", + " \"Overview\",\n", + " \"Analyst Opinions\",\n", + " \"Fundamental Analysis\",\n", + " \"Dark Pool and Shorts\",\n", + " \"Technical Analysis\",\n", + " \"Insider Trading\",\n", + " \"Behavioural Analysis\",\n", + " \"Quantitative Analysis\",\n", + " \"Prediction Techniques\",\n", + " ]\n", + ")\n", "\n", "htmlcode = openbb.widgets.h(3, \"KPIs\")\n", - "htmlcode += openbb.widgets.kpi([last_price], [\"Last closing price is above the average price ratings of last 30 days\", \"Average price ratings of last 30 day is above last closing price\"], avg_ratings_last_30_days)\n", + "htmlcode += openbb.widgets.kpi(\n", + " [last_price],\n", + " [\n", + " \"Last closing price is above the average price ratings of last 30 days\",\n", + " \"Average price ratings of last 30 day is above last closing price\",\n", + " ],\n", + " avg_ratings_last_30_days,\n", + ")\n", "if predictions:\n", - " htmlcode += openbb.widgets.kpi([0], [\"Regression (dollars per market day) on last 30 market days is negative\", \"Regression (dollars per market day) on last 30 market days is positive\"], regression_slope)\n", - "htmlcode += openbb.widgets.kpi([30, 70], [\"RSI level is oversold\", \"RSI level is normal\", \"RSI level is overbought\"], rsi_value) \n", - "htmlcode += openbb.widgets.kpi([0], [\"The sum of last 10 insider trading (in millions) was negative\", \"The sum of last 10 insider trading (in millions) was positive\"], last_10_insider_trading)\n", - "htmlcode += openbb.widgets.kpi([-.1, .1], [\"Last FinBrain sentiment is bearish\", \" Last FinBrain sentiment is neutral\", \"Last FinBrain sentiment is bullish\"], finbrain_sentiment_val) \n", + " htmlcode += openbb.widgets.kpi(\n", + " [0],\n", + " [\n", + " \"Regression (dollars per market day) on last 30 market days is negative\",\n", + " \"Regression (dollars per market day) on last 30 market days is positive\",\n", + " ],\n", + " regression_slope,\n", + " )\n", + "htmlcode += openbb.widgets.kpi(\n", + " [30, 70],\n", + " [\"RSI level is oversold\", \"RSI level is normal\", \"RSI level is overbought\"],\n", + " rsi_value,\n", + ")\n", + "htmlcode += openbb.widgets.kpi(\n", + " [0],\n", + " [\n", + " \"The sum of last 10 insider trading (in millions) was negative\",\n", + " \"The sum of last 10 insider trading (in millions) was positive\",\n", + " ],\n", + " last_10_insider_trading,\n", + ")\n", + "htmlcode += openbb.widgets.kpi(\n", + " [-0.1, 0.1],\n", + " [\n", + " \"Last FinBrain sentiment is bearish\",\n", + " \" Last FinBrain sentiment is neutral\",\n", + " \"Last FinBrain sentiment is bullish\",\n", + " ],\n", + " finbrain_sentiment_val,\n", + ")\n", "if predictions:\n", - " htmlcode += openbb.widgets.kpi([0], [\"The regression for the next 20th market price is below closing price\", \"The regression for the next 20th market price is above closing price\"], round(regression_val - last_price, 2)) \n", + " htmlcode += openbb.widgets.kpi(\n", + " [0],\n", + " [\n", + " \"The regression for the next 20th market price is below closing price\",\n", + " \"The regression for the next 20th market price is above closing price\",\n", + " ],\n", + " round(regression_val - last_price, 2),\n", + " )\n", "body += openbb.widgets.add_tab(\"SUMMARY\", htmlcode)\n", "\n", "htmlcode = openbb.widgets.row([price_chart])\n", - "htmlcode += openbb.widgets.row([openbb.widgets.h(3, \"Description\") + openbb.widgets.p(overview)])\n", + "htmlcode += openbb.widgets.row(\n", + " [openbb.widgets.h(3, \"Description\") + openbb.widgets.p(overview)]\n", + ")\n", "body += openbb.widgets.add_tab(\"Overview\", htmlcode)\n", "\n", "htmlcode = openbb.widgets.row([price_target_chart])\n", @@ -635,12 +732,20 @@ "htmlcode += openbb.widgets.row([df_analyst.to_html()])\n", "body += openbb.widgets.add_tab(\"Analyst Opinions\", htmlcode)\n", "\n", - "htmlcode = openbb.widgets.row([openbb.widgets.h(3, \"Estimates\") + df_year_estimates.head().to_html()])\n", - "htmlcode += openbb.widgets.row([openbb.widgets.h(3, \"Earnings\") + df_quarter_earnings.head().to_html()])\n", - "htmlcode += openbb.widgets.row([openbb.widgets.h(3, \"Revenues\") + df_quarter_revenues.head().to_html()])\n", - "htmlcode += openbb.widgets.row([openbb.widgets.h(3, \"SEC filings\") + df_sec_filings.head().to_html()])\n", + "htmlcode = openbb.widgets.row(\n", + " [openbb.widgets.h(3, \"Estimates\") + df_year_estimates.head().to_html()]\n", + ")\n", + "htmlcode += openbb.widgets.row(\n", + " [openbb.widgets.h(3, \"Earnings\") + df_quarter_earnings.head().to_html()]\n", + ")\n", + "htmlcode += openbb.widgets.row(\n", + " [openbb.widgets.h(3, \"Revenues\") + df_quarter_revenues.head().to_html()]\n", + ")\n", + "htmlcode += openbb.widgets.row(\n", + " [openbb.widgets.h(3, \"SEC filings\") + df_sec_filings.head().to_html()]\n", + ")\n", "body += openbb.widgets.add_tab(\"Fundamental Analysis\", htmlcode)\n", - " \n", + "\n", "htmlcode = openbb.widgets.row([net_short_position])\n", "htmlcode += openbb.widgets.row([price_vs_short_interest])\n", "htmlcode += openbb.widgets.row([dark_pools])\n", @@ -649,12 +754,19 @@ "\n", "body += openbb.widgets.add_tab(\"Technical Analysis\", openbb.widgets.row([ta_rsi]))\n", "\n", - "htmlcode = openbb.widgets.row([openbb.widgets.h(3, \"Last Activity\") + df_insider.head(10).to_html(col_space='75px')])\n", + "htmlcode = openbb.widgets.row(\n", + " [\n", + " openbb.widgets.h(3, \"Last Activity\")\n", + " + df_insider.head(10).to_html(col_space=\"75px\")\n", + " ]\n", + ")\n", "body += openbb.widgets.add_tab(\"Insider Trading\", htmlcode)\n", "\n", "htmlcode = openbb.widgets.row([finbrain_sentiment])\n", "htmlcode += openbb.widgets.row([snews])\n", - "htmlcode += openbb.widgets.row([openbb.widgets.h(3, \"Stocktwits\") + stocktwits_sentiment])\n", + "htmlcode += openbb.widgets.row(\n", + " [openbb.widgets.h(3, \"Stocktwits\") + stocktwits_sentiment]\n", + ")\n", "body += openbb.widgets.add_tab(\"Behavioural Analysis\", htmlcode)\n", "\n", "htmlcode = openbb.widgets.row([bw_month])\n", @@ -673,7 +785,7 @@ "report = openbb.widgets.html_report(title=report_name, stylesheet=stylesheet, body=body)\n", "\n", "# to save the results\n", - "with open(report_name + \".html\", \"w\", encoding='utf-8') as fh:\n", + "with open(report_name + \".html\", \"w\", encoding=\"utf-8\") as fh:\n", " fh.write(report)" ] }, diff --git a/tests/conftest.py b/tests/conftest.py index e6ca2d5d82bb..62b9624f003d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,6 +34,7 @@ os.environ["OPENBB_IMGUR_CLIENT_ID"] = "123" obbff.ENABLE_EXIT_AUTO_HELP = True + class Record: @staticmethod def extract_string(data: Any, **kwargs) -> str: From 735e0f73b1a8e79050c347395896966d45d22208 Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Wed, 22 Jun 2022 13:10:41 +0100 Subject: [PATCH 10/11] respect literal bool type --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 62b9624f003d..79fdb9792dcf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -32,7 +32,7 @@ os.environ["OPENBB_IMG_HOST_ACTIVE"] = "False" os.environ["OPENBB_DISCORD_BOT_TOKEN"] = "123" os.environ["OPENBB_IMGUR_CLIENT_ID"] = "123" -obbff.ENABLE_EXIT_AUTO_HELP = True +obbff.ENABLE_EXIT_AUTO_HELP = int(True) class Record: From c03ec671ff08f9002e9af7d0ddce88373fdce448 Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Wed, 22 Jun 2022 13:17:10 +0100 Subject: [PATCH 11/11] second attemp to respect literal bool --- tests/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 79fdb9792dcf..94afeb61812e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,6 +3,7 @@ import os import pathlib from typing import Any, Dict, List, Optional, Type +from distutils.util import strtobool # IMPORTATION THIRDPARTY import pandas as pd @@ -32,7 +33,7 @@ os.environ["OPENBB_IMG_HOST_ACTIVE"] = "False" os.environ["OPENBB_DISCORD_BOT_TOKEN"] = "123" os.environ["OPENBB_IMGUR_CLIENT_ID"] = "123" -obbff.ENABLE_EXIT_AUTO_HELP = int(True) +obbff.ENABLE_EXIT_AUTO_HELP = strtobool("True") class Record: