Skip to content

Commit

Permalink
fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Mar 3, 2024
1 parent f3fbc31 commit d64de13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions datafusion/tests/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def test_execution_plan(aggregate_df):
assert expected == plan.display()

# Check the number of partitions is as expected.
assert isinstance(type(plan.partition_count), int)
assert isinstance(plan.partition_count, int)

expected = (
"ProjectionExec: expr=[c1@0 as c1, SUM(test.c2)@1 as SUM(test.c2)]\n"
Expand Down Expand Up @@ -634,7 +634,7 @@ def test_empty_to_arrow_table(df):
def test_to_pylist(df):
# Convert datafusion dataframe to Python list
pylist = df.to_pylist()
assert isinstance(type(pylist), list)
assert isinstance(pylist, list)
assert pylist == [
{"a": 1, "b": 4, "c": 8},
{"a": 2, "b": 5, "c": 5},
Expand All @@ -645,7 +645,7 @@ def test_to_pylist(df):
def test_to_pydict(df):
# Convert datafusion dataframe to Python dictionary
pydict = df.to_pydict()
assert isinstance(type(pydict), dict)
assert isinstance(pydict, dict)
assert pydict == {"a": [1, 2, 3], "b": [4, 5, 6], "c": [8, 5, 8]}


Expand Down
2 changes: 1 addition & 1 deletion datafusion/tests/test_substrait.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_substrait_serialization(ctx):
# For now just make sure the method calls blow up
substrait_plan = ss.substrait.serde.serialize_to_plan("SELECT * FROM t", ctx)
substrait_bytes = substrait_plan.encode()
assert isinstance(type(substrait_bytes), bytes)
assert isinstance(substrait_bytes, bytes)
substrait_bytes = ss.substrait.serde.serialize_bytes("SELECT * FROM t", ctx)
substrait_plan = ss.substrait.serde.deserialize_bytes(substrait_bytes)
logical_plan = ss.substrait.consumer.from_substrait_plan(ctx, substrait_plan)
Expand Down

0 comments on commit d64de13

Please sign in to comment.