def checkGetReactionRatesByIndex(testId):
    print string.ljust("Check " + testId, rpadding),
    errorFlag = False
    words = readLine().split()
    n = rrPython.getNumberOfReactions()
    for i in range(n):
        value = rrPython.getReactionRate(i)
        if expectApproximately(float(words[i]), value, 1E-6) == False:
            errorFlag = True
            break
    print passMsg(errorFlag)
Beispiel #2
0
def checkGetReactionRatesByIndex(testId):
  print string.ljust ("Check " + testId, rpadding),
  errorFlag = False
  words = readLine().split()
  n = rrPython.getNumberOfReactions()
  for i in range (n):
      value = rrPython.getReactionRate (i)
      if expectApproximately(float (words[i]), value, 1E-6) == False:
          errorFlag = True
          break;
  print passMsg (errorFlag)
import rrPython
import os
import csv
os.chdir('C:\\RoadRunner\\bin')

function = 'getReactionRate'
rrPython.loadSBMLFromFile('C:\\RoadRunner\\Models\\feedback.xml')

try:
    rate = rrPython.getReactionRate()
    if str(rate) 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()
Beispiel #4
0
import rrPython
import os
import csv
os.chdir('C:\\RoadRunner\\bin')

function = 'getReactionRate'
rrPython.loadSBMLFromFile('C:\\RoadRunner\\Models\\feedback.xml')

try:
    rate = rrPython.getReactionRate()
    if str(rate) 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()