def test_fail1(self): """ Test if test_known1() would fail if we slightly adjusted the value comparison by some quantity close to numerical error. """ fail1 = self.True1 + 1e-15 methodVal = Fermi_integral(self.arg1, self.order1) testTrue = not np.isclose(methodVal, fail1, rtol=1e-16, atol=0.0) errStr = ( f"Fermi integral value test gives {methodVal} and should " f"not be equal to {fail1}." ) assert testTrue, errStr
def test_array(self): """Test Fermi_integral where argument is an array of inputs.""" methodVals = Fermi_integral(self.args, self.order1) testTrue = np.allclose(methodVals, self.Trues, rtol=1e-16, atol=0.0) errStr = f"Fermi integral value should be {self.Trues} and not {methodVals}." assert testTrue, errStr