Ticket #8922: test_hist.py

File test_hist.py, 477 bytes (added by Samuel Jackson, 6 years ago)

Testing script

Line 
1trans = Load('INTER00013463.nxs')
2CreateTransmissionWorkspaceAuto(trans, OutputWorkspace='Test')
3SaveNexusProcessed('Test',Filename="/tmp/Test.nxs")
4CropWorkspace('Test', XMax=1.2, OutputWorkspace='Test')
5
6def printHistory(algHist, depth=1):
7        for child in algHist.getChildHistories():
8                print ''.join('>'*depth) + child.name()
9                printHistory(child, depth+1)
10
11t = mtd["Test"]
12h=t.getHistory()
13l=h.getAlgorithmHistories()
14for child in l:
15        print child.name()
16        printHistory(child)