File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,15 @@ class bcolors:
50
50
UNDERLINE = '\033 [4m'
51
51
52
52
53
+ def cjust (string , width , fillchar = ' ' ):
54
+ while len (string ) < width :
55
+ string = fillchar + string
56
+ if len (string ) >= width :
57
+ break
58
+ string += fillchar
59
+ return string
60
+
61
+
53
62
def verify_spec_location (path ):
54
63
with open (os .path .join (path , 'package.json' )) as f :
55
64
data = json .load (f )
@@ -172,9 +181,10 @@ def check_test_version(
172
181
referenced = get_referenced_version (exercise )
173
182
up_to_date = available == referenced
174
183
if up_to_date :
175
- status , status_color = ' OK ' , bcolors .OKGREEN
184
+ status , status_color = 'OK ' , bcolors .OKGREEN
176
185
else :
177
186
status , status_color = 'NOT OK' , bcolors .FAIL
187
+ status = cjust (status , 8 )
178
188
if not no_color :
179
189
status = status_color + status + bcolors .ENDC
180
190
if not up_to_date or print_ok :
@@ -186,7 +196,7 @@ def check_test_version(
186
196
if name_only :
187
197
baseline = exercise
188
198
else :
189
- baseline = '[ {} ] {}: {}{}{}' .format (
199
+ baseline = '[{} ] {}: {}{}{}' .format (
190
200
status ,
191
201
exercise ,
192
202
referenced ,
You can’t perform that action at this time.
0 commit comments