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

Add tests create dataframe #136

Merged
merged 2 commits into from
Sep 11, 2019
Merged
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
18 changes: 18 additions & 0 deletions hpat/tests/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ def test_impl(A, B, c):
c = 2
pd.testing.assert_series_equal(hpat_func(A, B, c), test_impl(A, B, c))

@unittest.skip('Implement feature to create DataFrame without column names')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it is skipped? Work is in progress?

def test_create_without_column_names(self):
def test_impl():
df = pd.DataFrame([100, 200, 300, 400, 200, 100])
return df

hpat_func = hpat.jit(test_impl)
pd.testing.assert_frame_equal(hpat_func(), test_impl())

def test_unbox1(self):
def test_impl(df):
return df.A
Expand All @@ -73,6 +82,15 @@ def test_impl(df, cond):
pd.testing.assert_series_equal(hpat_func(df.copy(), True), test_impl(df.copy(), True))
pd.testing.assert_series_equal(hpat_func(df.copy(), False), test_impl(df.copy(), False))

@unittest.skip('Implement feature to create DataFrame without column names')
def test_unbox_without_column_names(self):
def test_impl(df):
return df

df = pd.DataFrame([100, 200, 300, 400, 200, 100])
hpat_func = hpat.jit(test_impl)
pd.testing.assert_frame_equal(hpat_func(df), test_impl(df))

@unittest.skip('AssertionError - fix needed\n'
'Attribute "dtype" are different\n'
'[left]: int64\n'
Expand Down