Skip to content

Commit 7a9b162

Browse files
doc_examples/test_ufunc
1 parent 3c1f18d commit 7a9b162

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

numba_cuda/numba/cuda/tests/doc_examples/test_ufunc.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,11 @@
88

99

1010
@skip_on_cudasim("cudasim doesn't support cuda import at non-top-level")
11-
class TestUFunc(CUDATestCase):
11+
def test_ufunc():
1212
"""
1313
Test calling a UFunc
1414
"""
15-
16-
def setUp(self):
17-
# Prevent output from this test showing
18-
# up when running the test suite
19-
self._captured_stdout = captured_stdout()
20-
self._captured_stdout.__enter__()
21-
super().setUp()
22-
23-
def tearDown(self):
24-
# No exception type, value, or traceback
25-
self._captured_stdout.__exit__(None, None, None)
26-
super().tearDown()
27-
28-
def test_ex_cuda_ufunc_call(self):
15+
with captured_stdout():
2916
# ex_cuda_ufunc.begin
3017
import numpy as np
3118
from numba import cuda
@@ -47,7 +34,3 @@ def f(r, x):
4734
# the sin ufunc inside the kernel, and NumPy's sin ufunc
4835
np.testing.assert_allclose(r, np.sin(x))
4936
# ex_cuda_ufunc.end
50-
51-
52-
if __name__ == "__main__":
53-
unittest.main()

0 commit comments

Comments
 (0)