mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
[Feature] Remove Python 3.9 (#7235)
* remove python 3.9 support and code * black * more cli lint * more linting * more lint * fix for tests * docstring grammar police * add lock to to build function to avoid async import race conditions * grammar police * lots more linting * relock
This commit is contained in:
@@ -9,7 +9,7 @@ from openbb_cli.session import Session
|
||||
# pylint: disable=unused-variable, redefined-outer-name
|
||||
|
||||
|
||||
class TestController(BaseController):
|
||||
class DummyController(BaseController):
|
||||
"""Test controller for the BaseController."""
|
||||
|
||||
PATH = "/test/"
|
||||
@@ -22,7 +22,7 @@ class TestController(BaseController):
|
||||
def base_controller():
|
||||
"""Set up the environment for each test function."""
|
||||
session = Session() # noqa: F841
|
||||
controller = TestController()
|
||||
controller = DummyController()
|
||||
return controller
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ def test_check_path_invalid(base_controller):
|
||||
def test_parse_input(base_controller):
|
||||
"""Test the parse_input method."""
|
||||
input_str = "/equity/price/help"
|
||||
expected_output = ["", "equity", "price", "help"]
|
||||
expected_output = ["equity", "price", "help"]
|
||||
assert (
|
||||
base_controller.parse_input(input_str) == expected_output
|
||||
), "Input parsing failed"
|
||||
|
||||
@@ -44,7 +44,6 @@ def test_upload_routine_timeout(auth_header, routine_data):
|
||||
with patch(
|
||||
"requests.post", side_effect=requests.exceptions.Timeout
|
||||
) as mocked_post: # noqa: F841
|
||||
|
||||
response = upload_routine(auth_header, **routine_data)
|
||||
|
||||
assert response is None
|
||||
@@ -56,7 +55,6 @@ def test_upload_routine_connection_error(auth_header, routine_data):
|
||||
with patch(
|
||||
"requests.post", side_effect=requests.exceptions.ConnectionError
|
||||
) as mocked_post: # noqa: F841
|
||||
|
||||
response = upload_routine(auth_header, **routine_data)
|
||||
|
||||
assert response is None
|
||||
|
||||
Reference in New Issue
Block a user