# Path: test/_common.py
# def print_test_result(expected, actual, error=None):
#     print(f"[expected]\n{expected}\n")
#     print(f"[actual]\n{actual}\n")
# 
#     if error:
#         print(error, file=sys.stderr)
# 
#     print("----------------------------------------")
# 
# Path: test/data.py
# TIME = datetime.datetime(2017, 1, 1, 0, 0, 0)
# INF = float("inf")
# NAN = float("nan")


import collections
import itertools
import pytest
import pytablewriter as ptw
    import xlwt  # noqa: W0611
from decimal import Decimal
from pytablereader import ExcelTableFileLoader
from tabledata import TableData
from ..._common import print_test_result
from ...data import headers, mix_header_list, mix_value_matrix, value_matrix, value_matrix_iter
                table_writer_class,
                "tablename",
                ["ha", "hb", "hc"],
                value_matrix_iter,
                TableData(
                    "tablename",
                    ["ha", "hb", "hc"],
                    [
                        [1.0, 2.0, 3.0],
                        [11.0, 12.0, 13.0],
                        [1.0, 2.0, 3.0],
                        [11.0, 12.0, 13.0],
                        [101.0, 102.0, 103.0],
                        [1001.0, 1002.0, 1003.0],
                    ],
                ),
            ]
            for table_writer_class in table_writer_class_list
        ],
    )
    def test_normal(self, tmpdir, writer_class, table, header, value, expected):
        if writer_class == ptw.ExcelXlsTableWriter and not HAS_XLWT:
            pytest.skip()

        test_file_path = tmpdir.join("test.xlsx")

        writer = writer_class()
        writer.open(str(test_file_path))
        writer.make_worksheet(table)
        writer.headers = header

# Path: test/_common.py
# def print_test_result(expected, actual, error=None):
#     print(f"[expected]\n{expected}\n")
#     print(f"[actual]\n{actual}\n")
# 
#     if error:
#         print(error, file=sys.stderr)
# 
#     print("----------------------------------------")
# 
# Path: test/data.py
# TIME = datetime.datetime(2017, 1, 1, 0, 0, 0)
# INF = float("inf")
# NAN = float("nan")


# Path: test/writer/binary/test_excel_writer.py
import collections
import itertools
import pytest
import pytablewriter as ptw
    import xlwt  # noqa: W0611
from decimal import Decimal
from pytablereader import ExcelTableFileLoader
from tabledata import TableData
from ..._common import print_test_result
from ...data import headers, mix_header_list, mix_value_matrix, value_matrix, value_matrix_iter

                table_writer_class,
                "tablename",
                ["ha", "hb", "hc"],
                value_matrix_iter,
                TableData(
                    "tablename",
                    ["ha", "hb", "hc"],
                    [
                        [1.0, 2.0, 3.0],
                        [11.0, 12.0, 13.0],
                        [1.0, 2.0, 3.0],
                        [11.0, 12.0, 13.0],
                        [101.0, 102.0, 103.0],
                        [1001.0, 1002.0, 1003.0],
                    ],
                ),
            ]
            for table_writer_class in table_writer_class_list
        ],
    )
    def test_normal(self, tmpdir, writer_class, table, header, value, expected):
        if writer_class == ptw.ExcelXlsTableWriter and not HAS_XLWT:
            pytest.skip()

        test_file_path = tmpdir.join("test.xlsx")

        writer = writer_class()
        writer.open(str(test_file_path))
        writer.make_worksheet(table)
        writer.headers = header

        writer.value_matrix = value