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
REFACTOR-#7008: Remove check_exception_type
argument of eval_general
function
#7009
Conversation
…f 'eval_general' function Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@@ -643,7 +655,22 @@ def test_pivot(data, index, columns, values): | |||
pytest.param("nunique", id="full_axis_func"), | |||
], | |||
) | |||
def test_pivot_table_data(data, index, columns, values, aggfunc): | |||
def test_pivot_table_data(data, index, columns, values, aggfunc, request): | |||
if ( |
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.
It’s not pretty, but it’s difficult to select the desired condition through parameters. It is also possible that there are several problems that will need to be investigated separately.
if check_exception_type is None: | ||
return None |
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.
This is the source of hidden problems.
assert isinstance( | ||
md_e, type(pd_e) | ||
), "Got Modin Exception type {}, but pandas Exception type {} was expected".format( | ||
type(md_e), type(pd_e) | ||
) |
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.
By default, the exception type is assumed to be the same. Situations where this is not the case should be handled using pytest.xfail
.
"index", [lambda df: df.columns[0], lambda df: df[df.columns[0]].values, None] | ||
"index", | ||
[lambda df: df.columns[0], lambda df: df.columns[:2], lib.no_default], | ||
ids=["one_column_index", "several_columns_index", "default"], |
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.
ids=["one_column_index", "several_columns_index", "default"], | |
ids=["one_column_index", "several_columns_index", "no_default"], |
?
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.
I can see your point, but I'm using default
word here to make it clearer that this is the default value that pandas uses.
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.
makes sense
What do these changes do?
flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
git commit -s
check_exception_type
argument ofeval_general
function #7008docs/development/architecture.rst
is up-to-date