aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_parse_value.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_parse_value.py')
-rw-r--r--tests/test_parse_value.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_parse_value.py b/tests/test_parse_value.py
new file mode 100644
index 0000000..c3f00de
--- /dev/null
+++ b/tests/test_parse_value.py
@@ -0,0 +1,24 @@
+import pytest
+
+from config_file.parsers.parse_value import parse_value
+
+
+@pytest.mark.parametrize(
+ "test_input,expected",
+ [
+ ("5", 5),
+ ("-5", -5),
+ ("-234.5", -234.5),
+ ("35.5", 35.5),
+ ("TRUE", True),
+ ("true", True),
+ ("false", False),
+ ("blah", "blah"),
+ (343, 343),
+ (3.2, 3.2),
+ (True, True),
+ ],
+)
+def test_parse_value(test_input, expected):
+ result = parse_value(test_input)
+ assert result == expected