Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add parallel test with condition
  • Loading branch information
AlexanderKalistratov committed Jan 5, 2020
commit 5e34a1ce099bfdbb0b6c4292d8f293ecfa3a38dd
19 changes: 19 additions & 0 deletions sdc/tests/test_hpat_jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,25 @@ def test_impl():
hpat_func = self.jit(test_impl)
pd.testing.assert_frame_equal(hpat_func(), test_impl())

@unittest.expectedFailure
def test_parallel_with_condition_1(self):
import numpy
import numba

def test_impl(arr, half=False):
size = len(arr)
parr = arr[0:size]

if half:
parr = arr[0:size//2]

return parr.sum()

jtest = numba.njit(test_impl)
ptest = numba.njit(test_impl, parallel=True)

arr = numpy.ones(128)
self.assertEqual(jtest(arr, True), ptest(arr, True))

if __name__ == "__main__":
unittest.main()