[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 <jleconte@google.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35865}
This commit is contained in:
Mirko Bonadei
2022-02-01 09:57:11 +01:00
committed by WebRTC LUCI CQ
parent 99cb34271b
commit b6653d9967

View File

@ -130,7 +130,7 @@ def ExtractTestRuns(lines, echo=False):
test_re = r'^' + android_prefix_re + (r'TEST (\w+) ([^ ]+?) ([^\s]+)' test_re = r'^' + android_prefix_re + (r'TEST (\w+) ([^ ]+?) ([^\s]+)'
r' ?([^\s]+)?\s*$') r' ?([^\s]+)?\s*$')
match = re.search(test_re, line) match = re.search(test_re, line.decode('utf-8'))
if match: if match:
yield match.groups() yield match.groups()
@ -183,7 +183,8 @@ def _RunPesq(executable_path,
# Find the scores in stdout of PESQ. # Find the scores in stdout of PESQ.
match = re.search( 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: if match:
raw_mos, _ = match.groups() raw_mos, _ = match.groups()
return {'pesq_mos': (raw_mos, 'unitless')} return {'pesq_mos': (raw_mos, 'unitless')}