# 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
from textwrap import dedent
from ..._common import print_test_result
from ...data import (
    float_header_list,
    float_value_matrix,
    headers,
    mix_header_list,
    mix_value_matrix,
    value_matrix,
    value_matrix_iter,
    value_matrix_with_none,
)
        writer = table_writer_class(headers=header, value_matrix=value)

        assert writer.dumps() == ""
        assert str(writer) == ""


class Test_CsvTableWriter_write_table_iter:
    @pytest.mark.parametrize(
        ["table", "header", "value", "expected"],
        [
            [
                "tablename",
                ["ha", "hb", "hc"],
                value_matrix_iter,
                dedent(
                    """\
                "ha","hb","hc"
                1,2,3
                11,12,13
                1,2,3
                11,12,13
                101,102,103
                1001,1002,1003
                """
                ),
            ]
        ],
    )
    def test_normal(self, capsys, table, header, value, expected):
        writer = table_writer_class(

# 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/text/test_csv_writer.py
import collections
import itertools
import pytest
import pytablewriter as ptw
from textwrap import dedent
from ..._common import print_test_result
from ...data import (
    float_header_list,
    float_value_matrix,
    headers,
    mix_header_list,
    mix_value_matrix,
    value_matrix,
    value_matrix_iter,
    value_matrix_with_none,
)

        writer = table_writer_class(headers=header, value_matrix=value)

        assert writer.dumps() == ""
        assert str(writer) == ""


class Test_CsvTableWriter_write_table_iter:
    @pytest.mark.parametrize(
        ["table", "header", "value", "expected"],
        [
            [
                "tablename",
                ["ha", "hb", "hc"],
                value_matrix_iter,
                dedent(
                    """\
                "ha","hb","hc"
                1,2,3
                11,12,13
                1,2,3
                11,12,13
                101,102,103
                1001,1002,1003
                """
                ),
            ]
        ],
    )
    def test_normal(self, capsys, table, header, value, expected):
        writer = table_writer_class(

            table_name=table, headers=header, value_matrix=value, iteration_length=len(value)