@@ -183,6 +183,7 @@ def test_registerFunction(self):
183183 self .assertEqual (6 , fc .evaluate ())
184184 return
185185
186+
186187def testResidual (noObserversInGlobalBuilders ):
187188 """Test the residual, which requires all other methods."""
188189 gen = ProfileGenerator ("test" )
@@ -244,9 +245,9 @@ def testResidual(noObserversInGlobalBuilders):
244245 fc .setEquation ("2*I" )
245246 fc .setResidualEquation ("resv" )
246247 chiv = fc .residual ()
247- assert ( dot (chiv , chiv ) ==
248- pytest . approx ( sum ((2 * xobs - yobs ) ** 2 ) / sum (yobs ** 2 )) )
249-
248+ assert dot (chiv , chiv ) == pytest . approx (
249+ sum ((2 * xobs - yobs ) ** 2 ) / sum (yobs ** 2 )
250+ )
250251
251252 # Make a custom residual.
252253 fc .setResidualEquation ("abs(eq-y)**0.5" )
@@ -265,6 +266,7 @@ def testResidual(noObserversInGlobalBuilders):
265266 assert noObserversInGlobalBuilders
266267 return
267268
269+
268270def test_setEquation (noObserversInGlobalBuilders ):
269271 """Check replacement of removed parameters."""
270272 fc = FitContribution ("test" )
@@ -278,6 +280,7 @@ def test_setEquation(noObserversInGlobalBuilders):
278280 assert noObserversInGlobalBuilders
279281 return
280282
283+
281284def test_getEquation (noObserversInGlobalBuilders ):
282285 """Check getting the current profile simulation formula."""
283286 fc = FitContribution ("test" )
@@ -288,6 +291,5 @@ def test_getEquation(noObserversInGlobalBuilders):
288291 return
289292
290293
291-
292294if __name__ == "__main__" :
293295 unittest .main ()
0 commit comments