mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 20:23:57 +00:00
18 lines
399 B
Python
18 lines
399 B
Python
import subprocess
|
|
import time
|
|
|
|
|
|
MAXIMUM_STARTUP_TIME = 0.5
|
|
|
|
|
|
def test_startup_time():
|
|
# warm up to generate pyc
|
|
subprocess.run(["freqtrade", "-h"])
|
|
|
|
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"
|