|
@@ -1,10 +1,13 @@
|
|
|
import unittest
|
|
|
|
|
|
import sys
|
|
|
-from utils import *
|
|
|
+try:
|
|
|
+ from unit.utils import *
|
|
|
+except ImportError: #for Python2
|
|
|
+ from utils import *
|
|
|
|
|
|
sys.path.append("wrappers")
|
|
|
-from modelverse import *
|
|
|
+from wrappers.modelverse import *
|
|
|
|
|
|
import threading
|
|
|
|
|
@@ -211,7 +214,7 @@ 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 log_output
|
|
|
+ import unit.log_output as log_output
|
|
|
log = []
|
|
|
ctrl = log_output.Controller(log, keep_running=False)
|
|
|
thrd = threading.Thread(target=ctrl.start)
|
|
@@ -275,7 +278,7 @@ class TestModelverse(unittest.TestCase):
|
|
|
attr_assign(model, p2t, "weight", 1)
|
|
|
print("END MANUAL CODE")
|
|
|
|
|
|
- import log_output
|
|
|
+ import unit.log_output as log_output
|
|
|
log = []
|
|
|
ctrl = log_output.Controller(log, keep_running=False)
|
|
|
thrd = threading.Thread(target=ctrl.start)
|