MCPcopy Create free account
hub / github.com/Cantera/cantera / check_inexact_conversion

Method check_inexact_conversion

test/python/test_utils.py:167–174  ·  view source on GitHub ↗
(self, value, check_type=None)

Source from the content-addressed store, hash-verified

165 assert held_type == check_type
166
167 def check_inexact_conversion(self, value, check_type=None):
168 out, held_type = _py_to_any_to_py(value)
169 if isinstance(value, np.ndarray):
170 assert out == value.tolist()
171 else:
172 assert out == list(value)
173 if check_type is not None:
174 assert held_type == check_type
175
176 def check_raises(self, value, ee, regex):
177 with pytest.raises(ee, match=regex):

Callers 6

test_setMethod · 0.95
test_empty_ndarrayMethod · 0.95
test_tupleMethod · 0.95
test_ndarray1Method · 0.95
test_ndarray2Method · 0.95
test_ndarray3Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected