Skip to content

Commit

Permalink
Added an out-of-mantid test script. Refs #11289.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Mar 12, 2015
1 parent 2ed6cde commit 3a54017
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Code/Mantid/scripts/HFIRPowderReduction/testGUI.py
@@ -0,0 +1,31 @@
####################
# Tester
####################

""" Test main """
import sys

import HfirPDReductionGUI
from PyQt4 import QtGui

def qapp():
if QtGui.QApplication.instance():
_app = QtGui.QApplication.instance()
else:
_app = QtGui.QApplication(sys.argv)
return _app

app = qapp()

reducer = HfirPDReductionGUI.MainWindow() #the main ui class in this file is called MainWindow
reducer.show()

# example: 'http://neutron.ornl.gov/user_data/hb2a/exp400/Datafiles/HB2A_exp0400_scan0001.dat'
print "Set to exp 400, scan 1"
reducer.ui.lineEdit_expNo.setText('400')
reducer.ui.lineEdit_scanNo.setText('1')
reducer.ui.lineEdit_cache.setText('/Users/wzz/Temp/')
reducer.doLoadData()

app.exec_()

0 comments on commit 3a54017

Please sign in to comment.