Добавлены тесты для CoreCommand

This commit is contained in:
2026-07-20 12:05:57 +03:00
parent 05ce5b7cf4
commit 781e885ffb
9 changed files with 823 additions and 7 deletions

View File

@@ -68,7 +68,14 @@ class CoreCommand(BaseCommand):
:param length Общая длина
"""
p_len = len(str(value)) + len(name) + 2
points = "." * (length - p_len)
if not name:
p_len = length - len(str(value)) - 1
else:
p_len = length - len(str(value)) - len(name) - 2
print(f"{name} {points} {value}")
if p_len <= 0:
points = ""
else:
points = " " + ("." * p_len) + " "
print(f"{name}{points}{value}")