mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-27 22:59:48 +01:00
20 lines
378 B
Python
20 lines
378 B
Python
"""Tests for typing helpers"""
|
|
|
|
import pytest
|
|
|
|
from pytiled_parser import typing_helpers as TH
|
|
|
|
TEST_IS_FLOAT_PARAMS = [
|
|
(1, True),
|
|
("1", True),
|
|
(1.1, True),
|
|
("1.1", True),
|
|
("one", False),
|
|
(None, False),
|
|
]
|
|
|
|
|
|
@pytest.mark.parametrize("string,expected", TEST_IS_FLOAT_PARAMS)
|
|
def test_is_float(string, expected):
|
|
assert TH.is_float(string) == expected
|