Add ANSI support to the build log view
This commit is contained in:
parent
8794547593
commit
540da00c64
7 changed files with 364 additions and 6 deletions
|
@ -129,7 +129,12 @@ class TestBuildLogs(BuildLogs):
|
|||
|
||||
@staticmethod
|
||||
def _generate_logs(count):
|
||||
return [(1, {'message': get_sentence()}, None) for _ in range(count)]
|
||||
others = []
|
||||
if random.randint(0, 10) <= 8:
|
||||
count = count - 2
|
||||
others = [(1, {'message': '\x1b[91m' + get_sentence()}, None), (1, {'message': '\x1b[0m'}, None)]
|
||||
|
||||
return others + [(1, {'message': get_sentence()}, None) for _ in range(count)]
|
||||
|
||||
@staticmethod
|
||||
def _compute_total_completion(statuses, total_images):
|
||||
|
|
Reference in a new issue