Skip to content

Commit

Permalink
Tweaking check_report() function
Browse files Browse the repository at this point in the history
- Filter out matplotlib font cache message as a warning to get tests to pass on Windows.
  • Loading branch information
desilinguist committed Feb 28, 2021
1 parent c1ed070 commit cb8edb9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rsmtool/test_utils.py
Expand Up @@ -26,7 +26,7 @@
from .rsmtool import run_experiment

html_error_regexp = re.compile(r'Traceback \(most recent call last\)')
html_warning_regexp = re.compile(r'<div class=".*?output_stderr.*?>')
html_warning_regexp = re.compile(r'<div class=".*?output_stderr.*?>([^<]+)')
section_regexp = re.compile(r'<h2>(.*?)</h2>')

# get the directory containing the tests
Expand Down Expand Up @@ -797,7 +797,9 @@ def check_report(html_file,
report_errors += 1
m_warning = html_warning_regexp.search(line)
if m_warning:
report_warnings += 1
warning_text = m_warning.group(1)
if not re.search(r'font\s*cache', warning_text, flags=re.IGNORECASE):
report_warnings += 1

if raise_errors:
assert_equal(report_errors, 0)
Expand Down

0 comments on commit cb8edb9

Please sign in to comment.