|
@@ -3,11 +3,13 @@ import unittest
|
|
|
import sys
|
|
|
try:
|
|
|
from unit.utils import *
|
|
|
+ import unit.log_output as log_output
|
|
|
except ImportError: #for Python2
|
|
|
from utils import *
|
|
|
+ import log_output as log_output
|
|
|
|
|
|
sys.path.append("wrappers")
|
|
|
-from wrappers.modelverse import *
|
|
|
+from modelverse import *
|
|
|
|
|
|
import threading
|
|
|
|
|
@@ -80,6 +82,9 @@ def compare_unordered_lists(got, expected):
|
|
|
class TestModelverse(unittest.TestCase):
|
|
|
proc = None
|
|
|
|
|
|
+ def runTest(self):
|
|
|
+ pass
|
|
|
+
|
|
|
@classmethod
|
|
|
def setUpClass(self):
|
|
|
TestModelverse.proc, address = start_mvc()
|
|
@@ -214,7 +219,6 @@ class TestModelverse(unittest.TestCase):
|
|
|
transformation_add_AL({"PetriNet_Runtime": "test/PetriNet_Runtime"}, {"PetriNet_Runtime": "test/PetriNet_Runtime"}, "test/pn_simulate", open("integration/code/pn_simulate.alc").read())
|
|
|
transformation_add_MT({"PetriNet_Runtime": "test/PetriNet_Runtime"}, {"PetriNet": "test/PetriNet"}, "test/pn_runtime_to_design", open("integration/code/pn_runtime_to_design.mvc").read(), add_tracability_R2D)
|
|
|
|
|
|
- import unit.log_output as log_output
|
|
|
log = []
|
|
|
ctrl = log_output.Controller(log, keep_running=False)
|
|
|
thrd = threading.Thread(target=ctrl.start)
|
|
@@ -278,7 +282,6 @@ class TestModelverse(unittest.TestCase):
|
|
|
attr_assign(model, p2t, "weight", 1)
|
|
|
print("END MANUAL CODE")
|
|
|
|
|
|
- import unit.log_output as log_output
|
|
|
log = []
|
|
|
ctrl = log_output.Controller(log, keep_running=False)
|
|
|
thrd = threading.Thread(target=ctrl.start)
|
|
@@ -462,3 +465,14 @@ class TestModelverse(unittest.TestCase):
|
|
|
self.fail()
|
|
|
except:
|
|
|
pass
|
|
|
+
|
|
|
+
|
|
|
+if __name__== "__main__":
|
|
|
+
|
|
|
+ tmv = TestModelverse()
|
|
|
+ print("Setting up class")
|
|
|
+ tmv.setUpClass()
|
|
|
+ print("Setting up")
|
|
|
+ tmv.setUp()
|
|
|
+ print("Start test")
|
|
|
+ tmv.test_operations()
|