-
Notifications
You must be signed in to change notification settings - Fork 79
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
Reverting numpy 1.21.2 to 1.19.2 and adding regression #300
Conversation
test/unit/test_data_utils.py
Outdated
def test_pyarrow_to_parquet_conversion_does_not_throw_exception(self): | ||
try: | ||
df = pd.DataFrame({'x': [1,2]}) | ||
df.to_parquet('test.parquet', engine='pyarrow') | ||
except Exception as e: | ||
assert False, "conversion to parquet should not fail" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def test_pyarrow_to_parquet_conversion_does_not_throw_exception(self): | |
try: | |
df = pd.DataFrame({'x': [1,2]}) | |
df.to_parquet('test.parquet', engine='pyarrow') | |
except Exception as e: | |
assert False, "conversion to parquet should not fail" | |
def test_pyarrow_to_parquet_conversion_regression_issue_106(self): | |
df = pd.DataFrame({'x': [1,2]}) | |
df.to_parquet('test.parquet', engine='pyarrow') |
We don't want the exception to be swallowed if it does fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to add an assertion, you check check that the values are equivalent before and after conversion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the exception it will fail the test, thus will fail the build as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but surfacing the actual exception will make the failure obvious and debugging easier instead of swallowing it with a generic "assert False".
54ac5bc
to
369821d
Compare
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.