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

tests: remove unnecessary pytest filterwarnings #1691

Merged
merged 15 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,9 @@ docstring-code-format = true
testpaths = ["tests"]
filterwarnings = [
"error",
'ignore:distutils Version classes are deprecated:DeprecationWarning',
'ignore:In the future `np.bool`',
'ignore:make_block is deprecated and will be removed',
'ignore:np.find_common_type is deprecated',
'ignore:is_sparse is deprecated and will be removed',
'ignore:Passing a BlockManager to DataFrame is deprecated',
'ignore:.*defaulting to pandas implementation',
'ignore:.*implementation has mismatches with pandas',
'ignore:.*Do not use the `random` module inside strategies',
'ignore:.*You are using pyarrow version',
MarcoGorelli marked this conversation as resolved.
Show resolved Hide resolved
'ignore:.*but when imported by',
'ignore:Distributing .*This may take some time',
'ignore:.*The default coalesce behavior',
'ignore:is_datetime64tz_dtype is deprecated',
'ignore: unclosed <socket.socket',
'ignore:The distutils package is deprecated and slated for removal',
]
xfail_strict = true
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
Expand Down
15 changes: 15 additions & 0 deletions tests/spark_like_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@
from tests.utils import Constructor


# Apply filterwarnings to all tests in this module
pytestmark = [
pytest.mark.filterwarnings(
"ignore:.*is_datetime64tz_dtype is deprecated and will be removed in a future version.*:DeprecationWarning"
),
pytest.mark.filterwarnings(
"ignore:.*distutils Version classes are deprecated. Use packaging.version instead.*:DeprecationWarning"
),
pytest.mark.filterwarnings("ignore: unclosed <socket.socket"),
pytest.mark.filterwarnings(
"ignore: The distutils package is deprecated and slated for removal in Python 3.12."
),
]


def _pyspark_constructor_with_session(obj: Any, spark_session: SparkSession) -> IntoFrame:
# NaN and NULL are not the same in PySpark
pd_df = pd.DataFrame(obj).replace({float("nan"): None}).reset_index()
Expand Down
Loading