Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit 5390f6d

Browse files
author
Ehsan Totoni
committed
cumsum test: check str in ir text
1 parent 4b4f542 commit 5390f6d

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

hpat/tests/test_hiframes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44
import hpat
55
from hpat.tests.test_utils import (count_array_REPs, count_parfor_REPs,
6-
count_parfor_OneDs, count_array_OneDs)
6+
count_parfor_OneDs, count_array_OneDs, dist_IR_contains)
77

88
class TestHiFrames(unittest.TestCase):
99
def test_cumsum(self):
@@ -19,6 +19,7 @@ def test_impl(n):
1919
self.assertEqual(count_array_OneDs(), 2)
2020
self.assertEqual(count_parfor_REPs(), 0)
2121
self.assertEqual(count_parfor_OneDs(), 2)
22+
self.assertTrue(dist_IR_contains('dist_cumsum'))
2223

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

hpat/tests/test_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ def count_array_OneDs():
1919
from hpat.distributed import Distribution
2020
vals = hpat.distributed.dist_analysis.array_dists.values()
2121
return sum([v==Distribution.OneD for v in vals])
22+
23+
def dist_IR_contains(*args):
24+
return sum([(s in hpat.distributed.fir_text) for s in args])

0 commit comments

Comments
 (0)