Skip to content

Commit

Permalink
Fix test due to error message change.
Browse files Browse the repository at this point in the history
As title.
  • Loading branch information
stuartarchibald committed Jul 26, 2023
1 parent 53d768f commit c6b226b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions numba/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,14 @@ def test_illegal_error_style_handling(self):
code = ("from numba import njit\n@njit\ndef foo():\n\t"
f"print('{source_compiled}')\nfoo()")
out, err = run_in_subprocess(dedent(code), env=new_env)
expected = ("environ NUMBA_CAPTURED_ERRORS defined but failed to parse "
"\'not_a_known_style\'")
self.assertIn(expected, err.decode('utf-8'))
expected = ("Environment variable \'NUMBA_CAPTURED_ERRORS\' is defined "
"but its associated value \'not_a_known_style\' could not "
"be parsed.")
err_msg = err.decode('utf-8')
self.assertIn(expected, err_msg)
ex_expected = ("The parse failed with exception: Invalid style in "
"NUMBA_CAPTURED_ERRORS: not_a_known_style")
self.assertIn(ex_expected, err_msg)
self.assertIn(source_compiled, out.decode('utf-8'))


Expand Down

0 comments on commit c6b226b

Please sign in to comment.