Ejemplo n.º 1
0
 def testGetSBMLFromAntimony(self):
   try:
     sandbox = TelluriumSandbox()
     sandbox.run("getSBMLFromAntimony", ANTIMONY_STG)
     self.assertEqual(sandbox.return_code, 0)
   except exceptions.MissingTelluriumError:
     pass
Ejemplo n.º 2
0
 def testRun(self):
   try:
     sandbox = TelluriumSandbox()
     sandbox.run("echo", INPUT)
     self.assertEqual(sandbox.return_code, 0)
     self.assertEqual(sandbox.output, INPUT)
   except exceptions.MissingTelluriumError:
     pass
Ejemplo n.º 3
0
def getXMLFromAntimony(antimony_stg):
    """
  Constructs an SBML model from the antimony string.
  :param str antimony_stg:
  :return str: SBML model in xml format
  """
    sandbox = TelluriumSandbox()
    sandbox.run("getSBMLFromAntimony", antimony_stg)
    if sandbox.return_code != 0:
        raise ValueError("Bad antimony string: %s" % antimony_stg)
    return sandbox.output
Ejemplo n.º 4
0
 def testConstructorMissingPakcage(self):
   with self.assertRaises(exceptions.MissingTelluriumError):
     sandbox = TelluriumSandbox(dependencies=["dummy"])
Ejemplo n.º 5
0
 def testGetSBMLFromAntimony(self):
     sandbox = TelluriumSandbox()
     sandbox.run("getSBMLFromAntimony", ANTIMONY_STG)
     self.assertEqual(sandbox.return_code, 0)
Ejemplo n.º 6
0
 def testRun(self):
     sandbox = TelluriumSandbox()
     sandbox.run("echo", INPUT)
     self.assertEqual(sandbox.return_code, 0)
     self.assertEqual(sandbox.output, INPUT)