def checkGetSteadyStateSelectionList(testId): print string.ljust("Check " + testId, rpadding), errorFlag = False line = readLine() words = line.split() result = rrPython.getSteadyStateSelectionList() for i in range(len(words)): if words[i] != result[i]: errorFlag = True break print passMsg(errorFlag)
def checkComputeSteadyStateValues(testId): print string.ljust("Check " + testId, rpadding), errorFlag = False list = rrPython.getSteadyStateSelectionList() ss = rrPython.computeSteadyStateValues() words = readLine().split() for i in range(len(list)): if expectApproximately(float(words[i]), ss[i], 1E-6) == False: errorFlag = True break print passMsg(errorFlag)
def checkComputeSteadyStateValues(testId): print string.ljust ("Check " + testId, rpadding), errorFlag = False list = rrPython.getSteadyStateSelectionList() ss = rrPython.computeSteadyStateValues() words = readLine().split() for i in range (len (list)): if expectApproximately(float (words[i]), ss[i], 1E-6) == False: errorFlag = True break; print passMsg (errorFlag)
def checkGetSteadyStateSelectionList(testId): print string.ljust ("Check " + testId, rpadding), errorFlag = False line = readLine () words = line.split() result = rrPython.getSteadyStateSelectionList () for i in range (len (words)): if words[i] != result[i]: errorFlag = True break print passMsg (errorFlag)
def setGetSteadyStateSelectionList(testId): print string.ljust("Check " + testId, rpadding), errorFlag = False myList = rrPython.getFloatingSpeciesIds() newList = list(myList) while newList == myList: random.shuffle(newList) rrPython.setSteadyStateSelectionList(newList) getList = rrPython.getSteadyStateSelectionList() if getList != newList: errorFlag = True print passMsg(errorFlag)
def setGetSteadyStateSelectionList(testId): print string.ljust ("Check " + testId, rpadding), errorFlag = False myList = rrPython.getFloatingSpeciesIds() newList = list (myList) while newList == myList: random.shuffle (newList) rrPython.setSteadyStateSelectionList (newList) getList = rrPython.getSteadyStateSelectionList() if getList != newList: errorFlag = True print passMsg (errorFlag)
import rrPython import os import csv os.chdir('C:\\RoadRunner\\bin') function = 'getSteadyStateSelectionList' rrPython.loadSBMLFromFile('C:\\RoadRunner\\Models\\feedback.xml') try: names = rrPython.getSteadyStateSelectionList() if str(names) is not False: result = 'True' else: result = 'False' except: result = 'False' PythonTestResults = open('C:\\RoadRunner\\PythonTestResults.csv', 'a') writer = csv.writer(PythonTestResults) writevar = function + '=' + result writer.writerow([writevar]) PythonTestResults.close()
import rrPython import os import csv os.chdir('C:\\RoadRunner\\bin') function = 'getSteadyStateSelectionList' rrPython.loadSBMLFromFile('C:\\RoadRunner\\Models\\feedback.xml') try: names = rrPython.getSteadyStateSelectionList() if str(names) is not False: result = 'True' else: result = 'False' except: result = 'False' PythonTestResults = open('C:\\RoadRunner\\PythonTestResults.csv','a') writer = csv.writer(PythonTestResults) writevar = function + '=' + result writer.writerow([writevar]) PythonTestResults.close()