Skip to content

Commit

Permalink
add test for to_numpy method and add tests for DataFrame too. comment…
Browse files Browse the repository at this point in the history
…ed out until frontend tests are independent of a backend
  • Loading branch information
Ishticode committed Jul 17, 2023
1 parent 5326263 commit b749686
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 2 deletions.
66 changes: 66 additions & 0 deletions ivy_tests/test_ivy/test_frontends/test_pandas/test_dataframe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# tests for the pandas frontend Series class methods

CLASS_TREE = "ivy.functional.frontends.pandas.DataFrame"

# ToDo: uncomment this when frontend tests are independent of backends

# @handle_frontend_method(
# class_tree=CLASS_TREE,
# init_tree="pandas.DataFrame",
# method_name="abs",
# dtype_x=helpers.dtype_and_values(
# available_dtypes=helpers.get_dtypes("valid"))
# )
# def test_pandas_series_abs(
# dtype_x,
# frontend,
# frontend_method_data,
# init_flags,
# method_flags,
# on_device,
# ):
# input_dtype, x = dtype_x
# helpers.test_frontend_method(
# init_input_dtypes=input_dtype,
# init_all_as_kwargs_np={
# "data": x[0],
# },
# method_input_dtypes=input_dtype,
# method_all_as_kwargs_np={},
# frontend_method_data=frontend_method_data,
# init_flags=init_flags,
# method_flags=method_flags,
# frontend=frontend,
# on_device=on_device,
# )


# @handle_frontend_method(
# class_tree=CLASS_TREE,
# init_tree="pandas.DataFrame",
# method_name="to_numpy",
# dtype_x=helpers.dtype_and_values(
# available_dtypes=helpers.get_dtypes("valid"))
# )
# def test_pandas_series_abs(
# dtype_x,
# frontend,
# frontend_method_data,
# init_flags,
# method_flags,
# on_device,
# ):
# input_dtype, x = dtype_x
# helpers.test_frontend_method(
# init_input_dtypes=input_dtype,
# init_all_as_kwargs_np={
# "data": x[0],
# },
# method_input_dtypes=input_dtype,
# method_all_as_kwargs_np={},
# frontend_method_data=frontend_method_data,
# init_flags=init_flags,
# method_flags=method_flags,
# frontend=frontend,
# on_device=on_device,
# )
35 changes: 33 additions & 2 deletions ivy_tests/test_ivy/test_frontends/test_pandas/test_series.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# tests for the pandas frontend Series class methods


CLASS_TREE = "ivy.functional.frontends.pandas.series.Series"
CLASS_TREE = "ivy.functional.frontends.pandas.Series"

# ToDo: uncomment this when frontend tests are independent of backends

Expand Down Expand Up @@ -34,3 +33,35 @@
# frontend=frontend,
# on_device=on_device,
# )


# @handle_frontend_method(
# class_tree=CLASS_TREE,
# init_tree="pandas.Series",
# method_name="to_numpy",
# dtype_x=helpers.dtype_and_values(
# available_dtypes=helpers.get_dtypes("valid"))
# )
# def test_pandas_series_abs(
# dtype_x,
# frontend,
# frontend_method_data,
# init_flags,
# method_flags,
# on_device,
# ):
# input_dtype, x = dtype_x
# helpers.test_frontend_method(
# init_input_dtypes=input_dtype,
# init_all_as_kwargs_np={
# "data": x[0],
# },
# method_input_dtypes=input_dtype,
# method_all_as_kwargs_np={},
# frontend_method_data=frontend_method_data,
# init_flags=init_flags,
# method_flags=method_flags,
# frontend=frontend,
# on_device=on_device,
# )

0 comments on commit b749686

Please sign in to comment.