From fd99cf6c8e879e6471588dfc3d062551438611e3 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Tue, 27 Aug 2019 20:17:42 -0400 Subject: Fix test to account for compression report --- src/scripts/test_cli.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/scripts') diff --git a/src/scripts/test_cli.py b/src/scripts/test_cli.py index e6e858909..7d9b443cf 100755 --- a/src/scripts/test_cli.py +++ b/src/scripts/test_cli.py @@ -154,11 +154,15 @@ def cli_entropy_tests(_tmp_dir): status_re = re.compile('Polling [a-z0-9_]+ gathered [0-9]+ bytes in [0-9]+ outputs with estimated entropy [0-9]+') unavail_re = re.compile('Source [a-z0-9_]+ is unavailable') - output_re = re.compile('[A-F0-9]+(\.\.\.)?') + comp_re = re.compile('Sample from [a-z0-9_]+ was .* compressed from [0-9]+ bytes to [0-9]+ bytes') + output_re = re.compile(r'[A-F0-9]+(...)?') status_next = True - for i,line in zip(range(len(output)), output.split('\n')): + for line in output.split('\n'): + if comp_re.match(line): + continue + if status_next: if status_re.match(line) is not None: status_next = False -- cgit v1.2.3