MCPcopy Create free account
hub / github.com/CompPhysVienna/n2p2 / test_nonzero_radius

Method test_nonzero_radius

test/python/test_CutoffFunction.py:98–101  ·  view source on GitHub ↗
(self, c1, cf_type, cf_value)

Source from the content-addressed store, hash-verified

96 @pytest.mark.parametrize("cf_type, cf_value",
97 zip(cutoff_function_types, cutoff_function_values))
98 def test_nonzero_radius(self, c1, cf_type, cf_value):
99 c1.setCutoffType(cf_type)
100 assert c1.f(test_radius) == pytest.approx(cf_value), (
101 "Wrong cutoff function value.")
102 def test_nonfloat_argument(self, c1):
103 with pytest.raises(TypeError):
104 c1.f("a")

Callers

nothing calls this directly

Calls 2

setCutoffTypeMethod · 0.80
fMethod · 0.45

Tested by

no test coverage detected