mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
73303b1c08
Full code coverage with annotations, fixing errors in various linters: ruff, wps, etc. Fixing errors in type checkers: ty, mypy, pyright. Formatting and bringing code to a consistent style, applying best practices in various aspects.
19 lines
489 B
Python
19 lines
489 B
Python
import io
|
|
from contextlib import redirect_stdout
|
|
from time import time
|
|
|
|
from argenta import App
|
|
|
|
|
|
def get_time_of_pre_cycle_setup(app: App) -> float:
|
|
"""
|
|
Public. Return time of pre cycle setup
|
|
:param app: app instance for testing time of pre cycle setup
|
|
:return: time of pre cycle setup as float
|
|
"""
|
|
start = time()
|
|
with redirect_stdout(io.StringIO()):
|
|
app._pre_cycle_setup() # pyright: ignore[reportPrivateUsage]
|
|
end = time()
|
|
return end - start
|