# 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/_common.py
# def strip_ansi_escape(value):


import collections
import pytest
import pytablewriter as ptw
from ..._common import print_test_result
from ...data import (
    float_header_list,
    float_value_matrix,
    mix_header_list,
    mix_value_matrix,
    value_matrix,
    vut_style_tabledata,
    vut_styles,
)
from ._common import regexp_ansi_escape, strip_ansi_escape
    ),
    Data(
        header=[],
        value=[],
        expected="",
    ),
]


table_writer_class = ptw.LatexTableWriter


class Test_LatexTableWriter_write_new_line:
    def test_normal(self, capsys):
        writer = table_writer_class()
        writer.write_null_line()

        out, _err = capsys.readouterr()

        assert out == "\n"


class Test_LatexTableWriter_write_table:
    @pytest.mark.parametrize(
        ["header", "value", "expected"],
        [[data.header, data.value, data.expected] for data in normal_test_data_list],
    )
    def test_normal(self, capsys, header, value, expected):
        writer = table_writer_class()
        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/text/_common.py
# def strip_ansi_escape(value):


# Path: test/writer/text/test_latex_table_writer.py
import collections
import pytest
import pytablewriter as ptw
from ..._common import print_test_result
from ...data import (
    float_header_list,
    float_value_matrix,
    mix_header_list,
    mix_value_matrix,
    value_matrix,
    vut_style_tabledata,
    vut_styles,
)
from ._common import regexp_ansi_escape, strip_ansi_escape

    ),
    Data(
        header=[],
        value=[],
        expected="",
    ),
]


table_writer_class = ptw.LatexTableWriter


class Test_LatexTableWriter_write_new_line:
    def test_normal(self, capsys):
        writer = table_writer_class()
        writer.write_null_line()

        out, _err = capsys.readouterr()

        assert out == "\n"


class Test_LatexTableWriter_write_table:
    @pytest.mark.parametrize(
        ["header", "value", "expected"],
        [[data.header, data.value, data.expected] for data in normal_test_data_list],
    )
    def test_normal(self, capsys, header, value, expected):
        writer = table_writer_class()
        writer.headers = header

        writer.value_matrix = value