Skip to content

Commit

Permalink
🚚 Rename var in test
Browse files Browse the repository at this point in the history
  • Loading branch information
ollyhensby committed Feb 15, 2023
1 parent 08d480c commit 88e384d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_autogrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class DataFrameSchema(BaseModel):
data=data,
transposed=transposed,
)
di_grid_with_data = grid_with_data.data.to_dict()
di_grid_with_data_before_order = grid_with_data.data.to_dict()
grid_with_data.order = order
if transposed:
assert tuple(grid_without_data.data.index) == tuple(
Expand All @@ -397,15 +397,15 @@ class DataFrameSchema(BaseModel):
assert tuple(grid_with_data.data.index) == tuple(
[grid_with_data.map_name_index.get(name) for name in order]
)
assert di_grid_with_data == grid_with_data.data.to_dict()
assert di_grid_with_data_before_order == grid_with_data.data.to_dict()
else:
assert tuple(grid_without_data.data.columns) == tuple(
[grid_without_data.map_name_index.get(name) for name in order]
)
assert tuple(grid_with_data.data.columns) == tuple(
[grid_with_data.map_name_index.get(name) for name in order]
)
assert di_grid_with_data == grid_with_data.data.to_dict()
assert di_grid_with_data_before_order == grid_with_data.data.to_dict()

@pytest.mark.parametrize("transposed", [True, False])
def test_order_multi_index(self, transposed: bool):
Expand Down Expand Up @@ -436,19 +436,19 @@ class DataFrameSchema(BaseModel):
data=data,
transposed=transposed,
)
di_grid_with_data = grid_with_data.data.to_dict()
di_grid_with_data_before_order = grid_with_data.data.to_dict()
grid_with_data.order = order
if transposed is True:
assert tuple(grid_without_data.data.index) == ()
assert tuple(grid_with_data.data.index) == tuple(
[grid_with_data.map_name_index.get(name) for name in order]
)
assert di_grid_with_data == grid_with_data.data.to_dict()
assert di_grid_with_data_before_order == grid_with_data.data.to_dict()
else:
assert tuple(grid_without_data.data.columns) == tuple(
[grid_without_data.map_name_index.get(name) for name in order]
)
assert tuple(grid_with_data.data.columns) == tuple(
[grid_with_data.map_name_index.get(name) for name in order]
)
assert di_grid_with_data == grid_with_data.data.to_dict()
assert di_grid_with_data_before_order == grid_with_data.data.to_dict()

0 comments on commit 88e384d

Please sign in to comment.