From 68eec5ab0a5a30f2ba62678ee217f034e4089f0d Mon Sep 17 00:00:00 2001 From: akharche Date: Fri, 6 Sep 2019 10:20:56 +0300 Subject: [PATCH] Add tests create dataframe --- hpat/tests/test_dataframe.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hpat/tests/test_dataframe.py b/hpat/tests/test_dataframe.py index 816373c58..87d3f2fba 100644 --- a/hpat/tests/test_dataframe.py +++ b/hpat/tests/test_dataframe.py @@ -49,6 +49,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') + 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()) + @unittest.skip('Error - fix needed\n' 'NUMA_PES=3 build') def test_unbox1(self): @@ -74,6 +83,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'