Ejemplo n.º 1
0
def setGetValues(IdList, testId):
    print string.ljust ("Check " + testId, rpadding),
    errorFlag = False
    for i in range (len(IdList)):
        value = random.random()*10
        rrPython.setValue (IdList[i], value)
        if expectApproximately (rrPython.getValue (IdList[i]), value, 1E-6) == False:
            errorFlag = True
            break
    print passMsg (errorFlag)
Ejemplo n.º 2
0
import rrPython
import os
import csv
os.chdir('C:\\RoadRunner\\bin')

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

species = 'S1'
val = 1.0

try:
    concentration = rrPython.setValue(species,val)
    if str(concentration) == str(val):
        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()
Ejemplo n.º 3
0
import rrPython
import os
import csv
os.chdir('C:\\RoadRunner\\bin')

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

species = 'S1'
val = 1.0

try:
    concentration = rrPython.setValue(species, val)
    if str(concentration) == str(val):
        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()