Sorry matthias, did not see that you already committed something and did overwrite you.

Added your version to it instead of mine and pushed again (since it was already overwritten by me).
This commit is contained in:
hippocritical 2023-03-10 09:23:56 +01:00
parent 5f8202e1b5
commit a3988f56b2
2 changed files with 138 additions and 139 deletions

View File

@ -20,12 +20,9 @@ def start_strategy_update(args: Dict[str, Any]) -> None:
:return: None
"""
if sys.version_info <= (3, 8):
print("This code requires Python 3.9 or higher. "
"We cannot continue. "
"Please upgrade your python version to use this command.")
if sys.version_info == (3, 8): # pragma: no cover
sys.exit("Freqtrade strategy updater requires Python version >= 3.9")
else:
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
strategy_objs = StrategyResolver.search_all_objects(

View File

@ -2,13 +2,15 @@
import sys
import pytest
from freqtrade.strategy.strategyupdater import StrategyUpdater
def test_strategy_updater(default_conf, caplog) -> None:
if sys.version_info <= (3, 8):
print("skipped tests since python version is 3.8 or lower.")
else:
if sys.version_info < (3, 9):
pytest.skip("StrategyUpdater is not compatible with Python 3.8", allow_module_level=True)
instance_strategy_updater = StrategyUpdater()
modified_code1 = instance_strategy_updater.update_code("""
class testClass(IStrategy):