rf: better implementation and testing of the offset feature of layers

This commit is contained in:
Benjamin Kirkbride
2020-04-19 21:25:43 -04:00
parent 86f7adb984
commit 156597637a
3 changed files with 32 additions and 15 deletions

View File

@@ -0,0 +1,19 @@
"""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