mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
Add test
This commit is contained in:
14
tests/commands/test_startup_time.py
Normal file
14
tests/commands/test_startup_time.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
|
||||
MAXIMUM_STARTUP_TIME = 0.5
|
||||
|
||||
|
||||
def test_startup_time():
|
||||
start = time.time()
|
||||
subprocess.run(["freqtrade", "-h"])
|
||||
elapsed = time.time() - start
|
||||
assert (
|
||||
elapsed < MAXIMUM_STARTUP_TIME
|
||||
), "The startup time is too long, try to use lazy import in the command entry function"
|
||||
Reference in New Issue
Block a user