Skip to content

Commit

Permalink
Fix Python function tests.
Browse files Browse the repository at this point in the history
They were calling getProperty().value on a non-child algorithm where the
internal workspace pointer is null.
Refs #8996
  • Loading branch information
martyngigg committed Feb 14, 2014
1 parent c1b0b91 commit 2adda60
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
Expand Up @@ -48,7 +48,6 @@ def test_function_has_been_registered(self):
def test_fit_succeeds_with_expected_answer(self):
AlgorithmFactory.subscribe(_InternalMakeLinear)
alg = testhelpers.run_algorithm("_InternalMakeLinear", A0=1.0,A1=0.75,OutputWorkspace='_test_linear')
input_ws = alg.getProperty("OutputWorkspace").value

func_string="name=Example1DFunction,A0=0.0,A1=0.0"
Fit(Function=func_string,InputWorkspace="_test_linear",StartX=1000,EndX=6000,CreateOutput=1,MaxIterations=2)
Expand Down
Expand Up @@ -48,7 +48,6 @@ def test_function_has_been_registered(self):
def test_fit_succeeds_with_expected_answer(self):
AlgorithmFactory.subscribe(_InternalMakeGaussian)
alg = testhelpers.run_algorithm("_InternalMakeGaussian", Height=300,Centre=2100,Sigma=700,OutputWorkspace='_test_gauss')
input_ws = alg.getProperty("OutputWorkspace").value

func_string="name=ExamplePeakFunction,NTerms=3,Height=309.92,PeakCentre=2105,Sigma=710.2"
Fit(Function=func_string,InputWorkspace="_test_gauss",StartX=150,EndX=4310,CreateOutput=1,MaxIterations=2)
Expand Down
Expand Up @@ -99,7 +99,6 @@ def test_fit( self ):
de = 0.0004
AlgorithmFactory.subscribe( _InternalMakeSEFTData )
alg = testhelpers.run_algorithm( '_InternalMakeSEFTData', nhalfbins = Nh, de = de, OutputWorkspace = '_test_seft_data', **parms )
input_ws = alg.getProperty( 'OutputWorkspace' ).value

sx = -Nh * de + de / 2
ex = ( Nh-1 ) * de + de / 2
Expand Down

0 comments on commit 2adda60

Please sign in to comment.