# 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
            ["force_convert", 1, 1.0, 1],
            ["force_convert", 1, 1.1, 1],
            ["force_convert", 1, "0", 0],
            ["force_convert", 1, "1.0", 1],
            ["force_convert", 1, "1.1", 1],
            ["force_convert", 1, 9223372036854775807, 9223372036854775807],
            ["force_convert", 1, "1,000,000,000,000", 1000000000000],
            ["force_convert", 1, True, 1],
            ["force_convert", 1, None, "E"],
            ["force_convert", 1, inf, "E"],
            ["force_convert", 1, nan, "E"],
            ["force_convert", 1, "test", "E"],
            ["force_convert", 1, "", "E"],
            ["force_convert", 2, 1, 1],
            ["force_convert", 2, 1.0, 1],
            ["force_convert", 2, 1.1, 1],
            ["force_convert", 2, "0", 0],
            ["force_convert", 2, "1.0", 1],
            ["force_convert", 2, "1.1", 1],
            ["force_convert", 2, 9223372036854775807, 9223372036854775807],
            ["force_convert", 2, "1,000,000,000,000", 1000000000000],
            ["force_convert", 2, True, 1],
            ["force_convert", 2, None, "E"],
            ["force_convert", 2, inf, "E"],
            ["force_convert", 2, nan, "E"],
            ["force_convert", 2, "test", "E"],
            ["force_convert", 2, "", "E"],
        ],
    )
    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_integer.py
import pytest
import typepy
from ._common import convert_wrapper

            ["force_convert", 1, 1.0, 1],
            ["force_convert", 1, 1.1, 1],
            ["force_convert", 1, "0", 0],
            ["force_convert", 1, "1.0", 1],
            ["force_convert", 1, "1.1", 1],
            ["force_convert", 1, 9223372036854775807, 9223372036854775807],
            ["force_convert", 1, "1,000,000,000,000", 1000000000000],
            ["force_convert", 1, True, 1],
            ["force_convert", 1, None, "E"],
            ["force_convert", 1, inf, "E"],
            ["force_convert", 1, nan, "E"],
            ["force_convert", 1, "test", "E"],
            ["force_convert", 1, "", "E"],
            ["force_convert", 2, 1, 1],
            ["force_convert", 2, 1.0, 1],
            ["force_convert", 2, 1.1, 1],
            ["force_convert", 2, "0", 0],
            ["force_convert", 2, "1.0", 1],
            ["force_convert", 2, "1.1", 1],
            ["force_convert", 2, 9223372036854775807, 9223372036854775807],
            ["force_convert", 2, "1,000,000,000,000", 1000000000000],
            ["force_convert", 2, True, 1],
            ["force_convert", 2, None, "E"],
            ["force_convert", 2, inf, "E"],
            ["force_convert", 2, nan, "E"],
            ["force_convert", 2, "test", "E"],
            ["force_convert", 2, "", "E"],
        ],
    )
    def test_normal(self, method, strict_level, value, expected):

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