Test Values Check¶
tests.values.test_values_check
¶
test_values_check.py file for the fejao_config_parser package.
This module contains unit tests for the ValuesCheck class, which is responsible for converting string values to their specified types based on the configuration.
¶
TestValuesCheck
¶
Bases: TestCase
Test suite for the ValuesCheck class.
Source code in tests/values/test_values_check.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
Methods:¶
test_bool_value_invalid_type_raises_value_error
¶
test_bool_value_invalid_type_raises_value_error()
Test that an invalid bool value type raises a ValueError.
Source code in tests/values/test_values_check.py
107 108 109 110 111 112 113 | |
test_bool_value_is_valid
¶
test_bool_value_is_valid()
Test that a valid bool value passes the check.
Source code in tests/values/test_values_check.py
45 46 47 48 49 50 | |
test_check_values_is_private
¶
test_check_values_is_private()
Test that __check_values method is private and not directly accessible.
Source code in tests/values/test_values_check.py
21 22 23 24 25 26 27 28 29 30 31 32 | |
test_dict_value_invalid_type_raises_value_error
¶
test_dict_value_invalid_type_raises_value_error()
Test that an invalid dict value type raises a ValueError.
Source code in tests/values/test_values_check.py
139 140 141 142 143 144 145 | |
test_dict_value_is_valid
¶
test_dict_value_is_valid()
Test that a valid dict value passes the check.
Source code in tests/values/test_values_check.py
73 74 75 76 77 78 | |
test_float_value_invalid_type_raises_value_error
¶
test_float_value_invalid_type_raises_value_error()
Test that an invalid float value type raises a ValueError.
Source code in tests/values/test_values_check.py
123 124 125 126 127 128 129 | |
test_float_value_is_valid
¶
test_float_value_is_valid()
Test that a valid float value passes the check.
Source code in tests/values/test_values_check.py
59 60 61 62 63 64 | |
test_int_value_invalid_type_raises_value_error
¶
test_int_value_invalid_type_raises_value_error()
Test that an invalid int value type raises a ValueError.
Source code in tests/values/test_values_check.py
115 116 117 118 119 120 121 | |
test_int_value_is_valid
¶
test_int_value_is_valid()
Test that a valid int value passes the check.
Source code in tests/values/test_values_check.py
52 53 54 55 56 57 | |
test_invalid_type_raises_value_error
¶
test_invalid_type_raises_value_error()
Test that an invalid string value type raises a ValueError.
Source code in tests/values/test_values_check.py
91 92 93 94 95 96 97 | |
test_list_value_invalid_type_raises_value_error
¶
test_list_value_invalid_type_raises_value_error()
Test that an invalid list value type raises a ValueError.
Source code in tests/values/test_values_check.py
131 132 133 134 135 136 137 | |
test_list_value_is_valid
¶
test_list_value_is_valid()
Test that a valid list value passes the check.
Source code in tests/values/test_values_check.py
66 67 68 69 70 71 | |
test_missing_value_is_ignored
¶
test_missing_value_is_ignored()
Test that a missing value is ignored and does not raise an error.
Source code in tests/values/test_values_check.py
84 85 86 87 88 89 | |
test_string_value_invalid_type_raises_value_error
¶
test_string_value_invalid_type_raises_value_error()
Test that an invalid string value type raises a ValueError.
Source code in tests/values/test_values_check.py
99 100 101 102 103 104 105 | |
test_string_value_is_valid
¶
test_string_value_is_valid()
Test that a valid string value passes the check.
Source code in tests/values/test_values_check.py
38 39 40 41 42 43 | |
test_unsupported_type_raises_value_error
¶
test_unsupported_type_raises_value_error()
Test that an unsupported type raises a ValueError.
Source code in tests/values/test_values_check.py
147 148 149 150 151 152 153 | |