Добавлены тесты для CoreCommand
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user