Example #1
0
def checkFloatingSpeciesInitialConditionIds (testId):
  print string.ljust ("Check " + testId, rpadding),
  errorFlag = False
  line = readLine ()
  words = line.split()
  expected = rrPython.getFloatingSpeciesInitialConditionIds()
  m = rrPython.getNumberOfFloatingSpecies()
  for i in range(0,m):
      if words[i] != expected[i]:
             errorFlag = True
             break
  print passMsg (errorFlag)
import rrPython
import os
import csv
os.chdir('C:\\RoadRunner\\bin')

function = 'getFloatingSpeciesInitialConditionIds'

try:
    names = rrPython.getFloatingSpeciesInitialConditionIds()
    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()