def test_dHdpos(self): x_range = [0, 1] y_max = 10 y_min = 0 positions = [0, 2, 1, 0.5] potential = pot.flat_well(x_range=x_range, y_max=y_max, y_min=y_min) expected_result = np.array([0, 0, 0, 0]) energies = potential.dhdpos(positions) self.assertEqual( type(expected_result), type(energies), msg= "returnType of potential was not correct! it should be an np.array" ) self.assertListEqual(list(expected_result), list(energies), msg="The results of " + potential.name + " are not correct!")
def test_constructor(self): pot.flat_well()