Ticket #9656 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Doctest failure for AbsorptionCorrection

Reported by: Nick Draper Owned by: Nick Draper
Priority: blocker Milestone: Release 3.2
Component: Documentation Keywords:
Cc: Blocked By:
Blocking: Tester: Karl Palmen

Description

ticket #9638 was tested and merged with a doctest tailure for AbsorptionCorrection.

This is to correct it.

The error was

Document: algorithms/AbsorptionCorrection-v1
--------------------------------------------
CreateSampleWorkspace-[Notice] CreateSampleWorkspace started
CreateSampleWorkspace-[Notice] CreateSampleWorkspace successful, Duration 0.00 seconds
ConvertUnits-[Notice] ConvertUnits started
ConvertUnits-[Notice] ConvertUnits successful, Duration 0.00 seconds
**********************************************************************
File "algorithms/AbsorptionCorrection-v1.rst", line 155, in ExSimpleSpere
Failed example:
    #setup the sample shape
    sphere = '''<sphere id="sample-sphere">
          <centre x="0" y="0" z="0"/>
          <radius val="0.1" />
      </sphere>'''

    ws = CreateSampleWorkspace("Histogram",NumBanks=1,BankPixelWidth=1)
    ws = ConvertUnits(ws,"Wavelength")
    ws = Rebin(ws,Param=[1])
    CreateSampleShape(ws,sphere)
    SetSampleMaterial(ws,ChemicalFormula="V")

    #restrict the number of wavelength points to speed up the example
    wsOut = AbsorptionCorrection(ws,NumberOfWavelengthPoints=5)

    print "The created workspace has one entry for each spectra: %i" % wsOut.getNumberHistograms()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.6/doctest.py", line 1253, in __run
        compileflags, 1) in test.globs
      File "<doctest ExSimpleSpere[0]>", line 9, in <module>
        ws = Rebin(ws,Param=[1])
      File "/home/builder/Jenkins/workspace/develop_incremental/label/rhel6-build/build/bin/mantid/simpleapi.py", line 566, in algorithm_wrapper
        _set_properties(algm, *args, **final_keywords)
      File "/home/builder/Jenkins/workspace/develop_incremental/label/rhel6-build/build/bin/mantid/simpleapi.py", line 530, in _set_properties
        alg_object.setProperty(key, value)
    RuntimeError: Unknown property search object Param
**********************************************************************
1 items had failures:
   1 of   1 in ExSimpleSpere
1 tests in 1 items.
0 passed and 1 failed.
***Test Failed*** 1 failures.

Change History

comment:1 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned
  • type changed from enhancement to defect

comment:2 Changed 6 years ago by Nick Draper

  • Status changed from assigned to inprogress

re #9656 fix doctest error

Changeset: 6f72d15227ded35c132a89cebdc8fce7da2eba3b

comment:3 Changed 6 years ago by Nick Draper

  • Status changed from inprogress to verify
  • Resolution set to fixed

check that the doctest passes

comment:4 Changed 6 years ago by Karl Palmen

  • Status changed from verify to verifying
  • Tester set to Karl Palmen

comment:5 Changed 6 years ago by Karl Palmen

  • Status changed from verifying to reopened
  • Resolution fixed deleted

The number after "The created workspace has one entry for each spectra" is 1 when 100 was expected.

comment:6 Changed 6 years ago by Nick Draper

  • Status changed from reopened to inprogress

re #9656 fix doctest error

Changeset: 619edec5358bd107629d4eae981bdcef9ed80c34

comment:7 Changed 6 years ago by Nick Draper

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:8 Changed 6 years ago by Karl Palmen

  • Status changed from verify to verifying

comment:9 Changed 6 years ago by Karl Palmen

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/9656_Fix_doctest_for_Absorption_correction'

Full changeset: 11ef5b64812430b5140e2596a0828591df466b12

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10499

Note: See TracTickets for help on using tickets.