-
Notifications
You must be signed in to change notification settings - Fork 32
Fix tests for using pytest #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -61,7 +61,7 @@ def driver(a, jitfunc): | |||
return b | |||
|
|||
|
|||
def test_driver(input_arr, device_ty, jitfunc): | |||
def case_driver(input_arr, device_ty, jitfunc): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def case_driver(input_arr, device_ty, jitfunc): | |
def check_driver(input_arr, device_ty, jitfunc): |
dppy = numba.njit(reduction) | ||
dppy_result = dppy(a) | ||
|
||
ref_result = reduction(a) | ||
|
||
np.testing.assert_array_equal(dppy_result, ref_result) | ||
self.assertTrue("Failed to lower parfor on DPPY-device" in msg.getvalue()) | ||
assert "Failed to lower parfor on DPPY-device" in str(w[-1].message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert "Failed to lower parfor on DPPY-device" in str(w[-1].message) | |
self.assertIn("Failed to lower parfor on DPPY-device", str(w[-1].message) |
@@ -4,6 +4,7 @@ | |||
import unittest | |||
from numba.tests.support import captured_stderr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove if not used.
@@ -5,6 +5,7 @@ | |||
from numba_dppy.testing import unittest | |||
from numba.tests.support import captured_stderr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used?
self.assertTrue( | ||
"Failed to lower parfor on DPPY-device" in msg_fallback_true.getvalue() | ||
) | ||
assert "Failed to lower parfor on DPPY-device" in str(w[-1].message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assertIn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my new comments.
Thank you @1e-to for the fixes. |
Closes #130