Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST-#7076: Explicitly check for exceptions in test_map_metadata.py #7077

Merged
merged 3 commits into from
Mar 13, 2024

Conversation

anmyachev
Copy link
Collaborator

@anmyachev anmyachev commented Mar 12, 2024

What do these changes do?

  • first commit message and PR title follow format outlined here

    NOTE: If you edit the PR title to match this format, you need to add another commit (even if it's empty) or amend your last commit for the CI job that checks the PR title to pick up the new PR title.

  • passes flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
  • passes black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
  • signed commit with git commit -s
  • Resolves Explicitly check for exceptions in test_map_metadata.py #7076
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

@anmyachev anmyachev marked this pull request as ready for review March 12, 2024 23:28
"Expected a 1D array, got an array with shape (3, 2)"
)
elif idx == 2:
# Modin's exception message looks better, it's probably fine just leave it as is
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you provide an example of the messages from Modin and pandas? Even if our message looks better, why should we not match pandas?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I created new issues. Let’s decide it separately?

raising_exceptions = None
if "float_nan_data" in request.node.callspec.id:
# Modin's exception message looks better, it's probably fine just leave it as is
raising_exceptions = False
Copy link
Collaborator

Choose a reason for hiding this comment

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

same

@@ -1648,13 +1684,6 @@ def test___invert___bool():
df_equals(modin_result, pandas_result)


def test___hash__():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

dataframes are no longer hashable.

>>> import pandas as pd       
>>> hash(pd.DataFrame([1,2,3,4])) 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'DataFrame'

…_metadata.py'

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@anmyachev
Copy link
Collaborator Author

@YarShev ready for review

@YarShev YarShev merged commit 2ed2d49 into modin-project:master Mar 13, 2024
37 checks passed
@anmyachev anmyachev deleted the issue7076 branch March 13, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explicitly check for exceptions in test_map_metadata.py
2 participants