Skip to content

Commit

Permalink
remove binary cases from python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
balbok0 committed Oct 16, 2024
1 parent 24f1921 commit 6f8901a
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions py-polars/tests/unit/operations/test_cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,6 @@ def test_cast_temporal(
"expected_value",
),
[
(str(2**7 - 1).encode(), pl.Binary, pl.Int8, 2**7 - 1),
(str(2**15 - 1).encode(), pl.Binary, pl.Int16, 2**15 - 1),
(str(2**31 - 1).encode(), pl.Binary, pl.Int32, 2**31 - 1),
(str(2**63 - 1).encode(), pl.Binary, pl.Int64, 2**63 - 1),
(b"1.0", pl.Binary, pl.Float32, 1.0),
(b"1.0", pl.Binary, pl.Float64, 1.0),
(str(2**7 - 1), pl.String, pl.Int8, 2**7 - 1),
(str(2**15 - 1), pl.String, pl.Int16, 2**15 - 1),
(str(2**31 - 1), pl.String, pl.Int32, 2**31 - 1),
Expand All @@ -478,13 +472,9 @@ def test_cast_temporal(
(str(2**15), pl.String, pl.Int16, None),
(str(2**31), pl.String, pl.Int32, None),
(str(2**63), pl.String, pl.Int64, None),
(str(2**7).encode(), pl.Binary, pl.Int8, None),
(str(2**15).encode(), pl.Binary, pl.Int16, None),
(str(2**31).encode(), pl.Binary, pl.Int32, None),
(str(2**63).encode(), pl.Binary, pl.Int64, None),
],
)
def test_cast_string_and_binary(
def test_cast_string(
value: int,
from_dtype: PolarsDataType,
to_dtype: PolarsDataType,
Expand Down Expand Up @@ -522,12 +512,6 @@ def test_cast_string_and_binary(
"expected_value",
),
[
(str(2**7 - 1).encode(), pl.Binary, pl.Int8, True, 2**7 - 1),
(str(2**15 - 1).encode(), pl.Binary, pl.Int16, True, 2**15 - 1),
(str(2**31 - 1).encode(), pl.Binary, pl.Int32, True, 2**31 - 1),
(str(2**63 - 1).encode(), pl.Binary, pl.Int64, True, 2**63 - 1),
(b"1.0", pl.Binary, pl.Float32, True, 1.0),
(b"1.0", pl.Binary, pl.Float64, True, 1.0),
(str(2**7 - 1), pl.String, pl.Int8, True, 2**7 - 1),
(str(2**15 - 1), pl.String, pl.Int16, True, 2**15 - 1),
(str(2**31 - 1), pl.String, pl.Int32, True, 2**31 - 1),
Expand All @@ -539,13 +523,9 @@ def test_cast_string_and_binary(
(str(2**15), pl.String, pl.Int16, False, None),
(str(2**31), pl.String, pl.Int32, False, None),
(str(2**63), pl.String, pl.Int64, False, None),
(str(2**7).encode(), pl.Binary, pl.Int8, False, None),
(str(2**15).encode(), pl.Binary, pl.Int16, False, None),
(str(2**31).encode(), pl.Binary, pl.Int32, False, None),
(str(2**63).encode(), pl.Binary, pl.Int64, False, None),
],
)
def test_strict_cast_string_and_binary(
def test_strict_cast_string(
value: int,
from_dtype: PolarsDataType,
to_dtype: PolarsDataType,
Expand Down

0 comments on commit 6f8901a

Please sign in to comment.