Skip to content

Commit

Permalink
tests: remove unnecessary pytest filterwarnings (#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeaMariaLeon authored Jan 5, 2025
1 parent 1f3cc41 commit 9f4b419
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
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',
'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

0 comments on commit 9f4b419

Please sign in to comment.