Skip to content

Commit 92d0f11

Browse files
committed
Fix iterrows test case to handle empty Index gracefully
- Modify test case to return a list with an empty dictionary when Index is empty - Remove unnecessary import of HeatFrame - Simplify test assertion for empty Index scenario
1 parent 517d03b commit 92d0f11

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/figure/test_facet.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pytest
22
from xlwings import Sheet
33

4-
from xlviews.dataframes.heat_frame import HeatFrame
54
from xlviews.dataframes.sheet_frame import SheetFrame
65
from xlviews.figure.plot import Plot
76
from xlviews.testing import is_app_available
@@ -48,5 +47,4 @@ def test_iterrows_none():
4847

4948
from xlviews.figure.plot import iterrows
5049

51-
it = iterrows(Index([]), None)
52-
assert next(it) == {}
50+
assert list(iterrows(Index([]), None)) == [{}]

0 commit comments

Comments
 (0)