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

Commit c88c9ce

Browse files
author
Ehsan Totoni
committed
start tests
1 parent f783de8 commit c88c9ce

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

hpat/tests/test_hiframes.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import unittest
2+
import pandas as pd
3+
import numpy as np
4+
import hpat
5+
6+
class TestHiFrames(unittest.TestCase):
7+
def test_cumsum(self):
8+
def test_impl(n):
9+
df = pd.DataFrame({'A': np.ones(n), 'B': np.random.ranf(n)})
10+
Ac = df.A.cumsum()
11+
return Ac.sum()
12+
13+
hpat_func = hpat.jit(test_impl)
14+
n = 11
15+
self.assertEqual(hpat_func(n), test_impl(n))
16+
17+
if __name__ == "__main__":
18+
unittest.main()

0 commit comments

Comments
 (0)