Commit 410e9508 authored by Georgios Dagkakis's avatar Georgios Dagkakis

test added for example

parent e50203c7
...@@ -93,7 +93,6 @@ def main(test=0): ...@@ -93,7 +93,6 @@ def main(test=0):
#output the trace of the simulation #output the trace of the simulation
ExcelHandler.outputTrace('CompoundMachine') ExcelHandler.outputTrace('CompoundMachine')
print G.maxSimTime
if test: if test:
return G.maxSimTime return G.maxSimTime
......
...@@ -214,4 +214,10 @@ class SimulationExamples(TestCase): ...@@ -214,4 +214,10 @@ class SimulationExamples(TestCase):
from dream.simulation.Examples.NonStarvingLineBatches import main from dream.simulation.Examples.NonStarvingLineBatches import main
result = main(test=1) result = main(test=1)
self.assertEquals(result['batches'], 4) self.assertEquals(result['batches'], 4)
self.assertEquals(result["working_ratio"], 100) self.assertEquals(result["working_ratio"], 100)
\ No newline at end of file
def testCompoundMachine(self):
from dream.simulation.Examples.CompoundMachine import main
result = main(test=1)
self.assertTrue(5.8 < result < 5.9)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment