Skip to content

Commit 40080dc

Browse files
committed
Modify the tests
1 parent 1d709d1 commit 40080dc

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

pandas/tests/io/formats/test_to_excel.py

-39
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99

1010
from pandas.errors import CSSWarning
1111

12-
from pandas import (
13-
DataFrame,
14-
MultiIndex,
15-
Timestamp,
16-
period_range,
17-
to_datetime,
18-
)
1912
import pandas._testing as tm
2013

2114
from pandas.io.formats.excel import (
@@ -435,35 +428,3 @@ def test_css_excel_cell_cache(styles, cache_hits, cache_misses):
435428

436429
assert cache_info.hits == cache_hits
437430
assert cache_info.misses == cache_misses
438-
439-
440-
def test_format_hierarchical_rows_with_periodindex():
441-
# GH#60099
442-
period_index = period_range(start="2006-10-06", end="2006-10-07", freq="D")
443-
df = DataFrame({"A": [0, 0]}, index=period_index)
444-
converter = CSSToExcelConverter()
445-
cells: list[CssExcelCell] = list(converter._format_hierarchical_rows(df))
446-
for cell in cells:
447-
assert isinstance(cell.val, Timestamp), "Expected cell value to be a Timestamp"
448-
assert cell.val in to_datetime(
449-
["2006-10-06", "2006-10-07"]
450-
), "Unexpected cell value"
451-
452-
453-
def test_format_hierarchical_rows_with_period():
454-
# GH#60099
455-
period_index = period_range(start="2006-10-06", end="2006-10-07", freq="D")
456-
number_index = ["1", "2"]
457-
df = DataFrame(
458-
{"A": [0, 0]}, index=MultiIndex.from_arrays([period_index, number_index])
459-
)
460-
converter = CSSToExcelConverter()
461-
cells: list[CssExcelCell] = list(converter._format_hierarchical_rows(df))
462-
for cell in cells:
463-
if cell.css_col == 0:
464-
assert isinstance(
465-
cell.val, Timestamp
466-
), "Expected cell value to be a Timestamp"
467-
assert cell.val in to_datetime(
468-
["2006-10-06", "2006-10-07"]
469-
), "Unexpected cell value"

0 commit comments

Comments
 (0)