Some simple tools for working with parsed Sensospot data.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
377 B

import pytest
@pytest.mark.parametrize(
"provided, expected",
[
("abc", ["abc"]),
(tuple("abc"), ["a", "b", "c"]),
({"a": 1, "b": 2}, ["a", "b"]),
(1, [1]),
],
)
def test_helpers_ensure_list(provided, expected):
from sensospot_tools.helpers import ensure_list
result = ensure_list(provided)
assert result == expected