apache / apache/arrow

[Python] Fix PytestUnraisableExceptionWarning in substrait test

Open
#14,766 9 comments 0 reactions 0 assignees View on GitHub
Component: Python Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 18h
Merged PRs (30d)
91

Description

### Describe the bug, including details regarding any error messages, version, and platform.

[`test_named_table_invalid_table_name` ](https://github.com/apache/arrow/blob/63f013cdb36d05f6f96a145aff3c6232470f2d02/python/pyarrow/tests/test_substrait.py#L229) generates a `PytestUnraisableExceptionWarning` in the tests. The exception itself is:
> Traceback (most recent call last):
File "/home/joris/scipy/repos/arrow/python/pyarrow/tests/test_substrait.py", line 238, in table_provider
raise Exception("Unrecognized table name")
Exception: Unrecognized table name

The exception ought to be raised properly instead of 'hidden' as a warning.

### Component(s)

Python

Contributor guide

Open the contributing guide

Research direction

Start with test_named_table_invalid_table_name in python/pyarrow/tests/test_substrait.py, especially the table_provider code around line 238, and reproduce the PytestUnraisableExceptionWarning. Done means the “Unrecognized table name” exception is raised properly by the test and the warning is no longer emitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.