# Path: test/converter/_common.py
# def convert_wrapper(typeobj, method):
#     try:
#         return getattr(typeobj, method)()
#     except (typepy.TypeConversionError):
#         return EXCEPTION_RESULT


import pytest
import typepy
from ._common import convert_wrapper
            ["try_convert", 2, True, None],
            ["try_convert", 2, inf, None],
            ["try_convert", 2, nan, None],
            ["force_convert", 0, "abc", "abc"],
            ["force_convert", 0, "", ""],
            ["force_convert", 0, 1, "1"],
            ["force_convert", 0, "-1", "-1"],
            ["force_convert", 0, None, "None"],
            ["force_convert", 0, True, "True"],
            ["force_convert", 0, inf, "inf"],
            ["force_convert", 0, nan, "nan"],
            ["force_convert", 1, "abc", "abc"],
            ["force_convert", 1, "", ""],
            ["force_convert", 1, 1, "1"],
            ["force_convert", 1, "-1", "-1"],
            ["force_convert", 1, None, "None"],
            ["force_convert", 1, True, "True"],
            ["force_convert", 1, inf, "inf"],
            ["force_convert", 1, nan, "nan"],
            ["force_convert", 2, "abc", "abc"],
            ["force_convert", 2, "", ""],
            ["force_convert", 2, 1, "1"],
            ["force_convert", 2, "-1", "-1"],
            ["force_convert", 2, None, "None"],
            ["force_convert", 2, True, "True"],
            ["force_convert", 2, inf, "inf"],
            ["force_convert", 2, nan, "nan"],
        ],
    )
    def test_normal(self, method, strict_level, value, expected):

# Path: test/converter/_common.py
# def convert_wrapper(typeobj, method):
#     try:
#         return getattr(typeobj, method)()
#     except (typepy.TypeConversionError):
#         return EXCEPTION_RESULT


# Path: test/converter/test_string.py
import pytest
import typepy
from ._common import convert_wrapper

            ["try_convert", 2, True, None],
            ["try_convert", 2, inf, None],
            ["try_convert", 2, nan, None],
            ["force_convert", 0, "abc", "abc"],
            ["force_convert", 0, "", ""],
            ["force_convert", 0, 1, "1"],
            ["force_convert", 0, "-1", "-1"],
            ["force_convert", 0, None, "None"],
            ["force_convert", 0, True, "True"],
            ["force_convert", 0, inf, "inf"],
            ["force_convert", 0, nan, "nan"],
            ["force_convert", 1, "abc", "abc"],
            ["force_convert", 1, "", ""],
            ["force_convert", 1, 1, "1"],
            ["force_convert", 1, "-1", "-1"],
            ["force_convert", 1, None, "None"],
            ["force_convert", 1, True, "True"],
            ["force_convert", 1, inf, "inf"],
            ["force_convert", 1, nan, "nan"],
            ["force_convert", 2, "abc", "abc"],
            ["force_convert", 2, "", ""],
            ["force_convert", 2, 1, "1"],
            ["force_convert", 2, "-1", "-1"],
            ["force_convert", 2, None, "None"],
            ["force_convert", 2, True, "True"],
            ["force_convert", 2, inf, "inf"],
            ["force_convert", 2, nan, "nan"],
        ],
    )
    def test_normal(self, method, strict_level, value, expected):

        assert convert_wrapper(typepy.String(value, strict_level), method) == expected