From b6653d99676ee6941a957ab316ab42221b835c1a Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Tue, 1 Feb 2022 09:57:11 +0100 Subject: [PATCH] [python3] - Fix low_bandwidth_audio_test.py (take 3) No-Presubmit: True Bug: webrtc:13607 Change-Id: Iff325ad10138fe8b7e1df1fa169652f5795fa718 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250081 Reviewed-by: Jeremy Leconte Owners-Override: Mirko Bonadei Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/main@{#35865} --- audio/test/low_bandwidth_audio_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/audio/test/low_bandwidth_audio_test.py b/audio/test/low_bandwidth_audio_test.py index 563e5d75f3..4b3b61b94a 100755 --- a/audio/test/low_bandwidth_audio_test.py +++ b/audio/test/low_bandwidth_audio_test.py @@ -130,7 +130,7 @@ def ExtractTestRuns(lines, echo=False): test_re = r'^' + android_prefix_re + (r'TEST (\w+) ([^ ]+?) ([^\s]+)' r' ?([^\s]+)?\s*$') - match = re.search(test_re, line) + match = re.search(test_re, line.decode('utf-8')) if match: yield match.groups() @@ -183,7 +183,8 @@ def _RunPesq(executable_path, # Find the scores in stdout of PESQ. match = re.search( - r'Prediction \(Raw MOS, MOS-LQO\):\s+=\s+([\d.]+)\s+([\d.]+)', out) + r'Prediction \(Raw MOS, MOS-LQO\):\s+=\s+([\d.]+)\s+([\d.]+)', + out.decode('utf-8')) if match: raw_mos, _ = match.groups() return {'pesq_mos': (raw_mos, 'unitless')}