# 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 os
import sys
import pytest
import pytablewriter as ptw
    import pandas as pd
from decimal import Decimal
from tabledata import TableData
from ..._common import print_test_result
from ...data import headers, value_matrix
    Data(
        table="empty header",
        header=[],
        value=value_matrix,
        expected=TableData(
            "empty_header",
            ["A", "B", "C", "D", "E"],
            [[1, 123.1, "a", 1, 1], [2, 2.2, "bb", 2.2, 2.2], [3, 3.3, "ccc", 3, "cccc"]],
        ),
    ),
]

empty_test_data_list = [
    Data(table="dummy", header=[], value=[], expected=None),
    Data(table="dummy", header=headers, value=[], expected=None),
]


@pytest.mark.skipif(SKIP_DATAFRAME_TEST, reason="required package not found")
class Test_PandasDataFramePickleWriter_write_table:
    @pytest.mark.parametrize(
        ["table", "header", "value", "expected"],
        [[data.table, data.header, data.value, data.expected] for data in normal_test_data_list],
    )
    def test_normal(self, tmpdir, table, header, value, expected):
        test_filepath = tmpdir.join("test1.pkl")

        writer = ptw.PandasDataFramePickleWriter(
            table_name=table,
            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_pandas_writer.py
import collections
import os
import sys
import pytest
import pytablewriter as ptw
    import pandas as pd
from decimal import Decimal
from tabledata import TableData
from ..._common import print_test_result
from ...data import headers, value_matrix

    Data(
        table="empty header",
        header=[],
        value=value_matrix,
        expected=TableData(
            "empty_header",
            ["A", "B", "C", "D", "E"],
            [[1, 123.1, "a", 1, 1], [2, 2.2, "bb", 2.2, 2.2], [3, 3.3, "ccc", 3, "cccc"]],
        ),
    ),
]

empty_test_data_list = [
    Data(table="dummy", header=[], value=[], expected=None),
    Data(table="dummy", header=headers, value=[], expected=None),
]


@pytest.mark.skipif(SKIP_DATAFRAME_TEST, reason="required package not found")
class Test_PandasDataFramePickleWriter_write_table:
    @pytest.mark.parametrize(
        ["table", "header", "value", "expected"],
        [[data.table, data.header, data.value, data.expected] for data in normal_test_data_list],
    )
    def test_normal(self, tmpdir, table, header, value, expected):
        test_filepath = tmpdir.join("test1.pkl")

        writer = ptw.PandasDataFramePickleWriter(
            table_name=table,
            headers=header,

            value_matrix=value,