# 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 pytest
import pytablewriter
from textwrap import dedent
from ..._common import print_test_result
from ...data import (
    headers,
    mix_header_list,
    mix_value_matrix,
    null_test_data_list,
    value_matrix,
    value_matrix_iter,
    value_matrix_with_none,
)

        assert out == expected
        assert writer.dumps() == expected
        assert str(writer) == expected

    def test_normal_(self):
        writer = table_writer_class(
            headers=["hoge", "foo"],
            value_matrix=[
                [1, "abc"],
                [2, "xyz"],
            ],
            table_style="display: inline-table;",
        )
        expected = dedent(
            """\
            {| class="wikitable" style="display: inline-table;"
            ! hoge
            ! foo
            |-
            | style="text-align:right"| 1
            | abc
            |-
            | style="text-align:right"| 2
            | xyz
            |}
            """
        )
        output = writer.dumps()


# 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_mediawiki_writer.py
import collections
import pytest
import pytablewriter
from textwrap import dedent
from ..._common import print_test_result
from ...data import (
    headers,
    mix_header_list,
    mix_value_matrix,
    null_test_data_list,
    value_matrix,
    value_matrix_iter,
    value_matrix_with_none,
)


        assert out == expected
        assert writer.dumps() == expected
        assert str(writer) == expected

    def test_normal_(self):
        writer = table_writer_class(
            headers=["hoge", "foo"],
            value_matrix=[
                [1, "abc"],
                [2, "xyz"],
            ],
            table_style="display: inline-table;",
        )
        expected = dedent(
            """\
            {| class="wikitable" style="display: inline-table;"
            ! hoge
            ! foo
            |-
            | style="text-align:right"| 1
            | abc
            |-
            | style="text-align:right"| 2
            | xyz
            |}
            """
        )
        output = writer.dumps()


        print_test_result(expected=expected, actual=output)