diff options
Diffstat (limited to 'tests/test_utils.py')
| -rw-r--r-- | tests/test_utils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100644 index 0000000..f7f8b00 --- /dev/null +++ b/tests/test_utils.py @@ -0,0 +1,12 @@ +from viewstate.utils import list_to_tuple + + +def test_list_to_tuple(): + assert list_to_tuple([1, 2, 3]) == (1, 2, 3) + assert list_to_tuple((9, 8, 7)) == (9, 8, 7) + assert list_to_tuple((None, [2, 3, None])) == (None, (2, 3, None)) + assert list_to_tuple(("abc", [2, [3], (9, 8, True, False)])) == ( + "abc", + (2, (3,), (9, 8, True, False)), + ) + assert list_to_tuple("abc") == "abc" |
