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

Method test_nonzero_radius

test/python/test_CutoffFunction.py:118–121  ·  view source on GitHub ↗
(self, c1, cf_type, cf_dvalue)

Source from the content-addressed store, hash-verified

116 zip(cutoff_function_types,
117 cutoff_function_dvalues))
118 def test_nonzero_radius(self, c1, cf_type, cf_dvalue):
119 c1.setCutoffType(cf_type)
120 assert c1.df(test_radius) == pytest.approx(cf_dvalue), (
121 "Wrong cutoff derivative value.")
122 def test_nonfloat_argument(self, c1):
123 with pytest.raises(TypeError):
124 c1.df("a")

Callers

nothing calls this directly

Calls 2

setCutoffTypeMethod · 0.80
dfMethod · 0.45

Tested by

no test coverage detected