-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from sumannam/dev/DevOps
I created a file (test_main.py) to distinguish between the main.py an…
- Loading branch information
Showing
9 changed files
with
73 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,8 @@ | ||
import os | ||
import sys | ||
import time | ||
|
||
sys.path.append('D:/Git/DEVS-Python') | ||
sys.path.append('D:/Git/DEVS-Python/projects/simparc') | ||
|
||
TBASE_FOLDER = os.path.dirname(os.path.abspath(__file__)) + "\\tbase" | ||
|
||
from projects.simparc.mbase.IP import IP | ||
from TEST_ATOMIC_MODELS import TEST_ATOMIC_MODELS | ||
|
||
if __name__ == '__main__': | ||
ip = IP() | ||
model_test = TEST_ATOMIC_MODELS() | ||
|
||
## 자동 테스트 | ||
# json_file = os.path.join(TBASE_FOLDER, 'ip_test_script.json') | ||
|
||
# start = time.time() | ||
|
||
# model_test.runAutoModelTest(ip, json_file) | ||
# end = time.time() | ||
|
||
# print(f"{end - start:.5f} sec") | ||
|
||
## 수동 테스트 | ||
ip.modelTest(ip) | ||
|
||
import config | ||
|
||
# 시뮬레이션 | ||
# from projects.simparc.EF_P import EF_P | ||
# if __name__ == '__main__': | ||
# ef_p = EF_P() | ||
# ef_p.initialize() | ||
# ef_p.restart() | ||
|
||
from projects.simparc.coupbase.EF_P import EF_P | ||
if __name__ == '__main__': | ||
ef_p = EF_P() | ||
ef_p.initialize() | ||
ef_p.restart() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import os | ||
import time | ||
|
||
import config | ||
|
||
from projects.simparc.mbase.IP import IP | ||
from TEST_ATOMIC_MODELS import TEST_ATOMIC_MODELS | ||
|
||
if __name__ == '__main__': | ||
ip = IP() | ||
model_test = TEST_ATOMIC_MODELS() | ||
|
||
# 자동 테스트 | ||
json_file = os.path.join(config.TBASE_FOLDER, 'ip_test_script.json') | ||
|
||
start = time.time() | ||
|
||
model_test.runAutoModelTest(ip, json_file) | ||
end = time.time() | ||
|
||
print(f"{end - start:.5f} sec") | ||
|
||
## 수동 테스트 | ||
# ip.modelTest(ip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import os | ||
import sys | ||
|
||
if 'win' in sys.platform: # Windows | ||
sys.path.append('D:/Git/DEVS-Python') | ||
sys.path.append('D:/Git/DEVS-Python/projects/simparc') | ||
else: # Linux, Unix, MacOS | ||
sys.path.append('.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,40 @@ | ||
import sys | ||
import unittest | ||
|
||
sys.path.append('D:/Git/DEVS-Python') | ||
import config | ||
|
||
from testPModelTest import testPModelTest | ||
# from testEF_P import testEF_P | ||
# from testROOT_CO_ORDINATORS import testROOT_CO_ORDINATORS | ||
# from testPModelTest import testPModelTest | ||
from testEF_P import testEF_P | ||
from testROOT_CO_ORDINATORS import testROOT_CO_ORDINATORS | ||
|
||
# TO-DO : 테스트 실행 파일을 엔진과 모델 테스트로 분리할 것[Jira-DEVS-41] | ||
if __name__ == '__main__': | ||
test_p0 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
test_p1 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
test_p2 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
test_p3 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
test_p4 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_p0 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_p1 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_p2 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_p3 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_p4 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_p5 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_p6 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_p7 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_p8 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_p9 = unittest.TestLoader().loadTestsFromTestCase(testPModelTest) | ||
# test_efp = unittest.TestLoader().loadTestsFromTestCase(testEF_P) | ||
# test_root_coordinators = unittest.TestLoader().loadTestsFromTestCase(testROOT_CO_ORDINATORS) | ||
test_efp = unittest.TestLoader().loadTestsFromTestCase(testEF_P) | ||
test_root_coordinators = unittest.TestLoader().loadTestsFromTestCase(testROOT_CO_ORDINATORS) | ||
|
||
allTests = unittest.TestSuite() | ||
allTests.addTest(test_p0) | ||
allTests.addTest(test_p1) | ||
allTests.addTest(test_p2) | ||
allTests.addTest(test_p3) | ||
allTests.addTest(test_p4) | ||
# allTests.addTest(test_p0) | ||
# allTests.addTest(test_p1) | ||
# allTests.addTest(test_p2) | ||
# allTests.addTest(test_p3) | ||
# allTests.addTest(test_p4) | ||
# allTests.addTest(test_p5) | ||
# allTests.addTest(test_p6) | ||
# allTests.addTest(test_p7) | ||
# allTests.addTest(test_p8) | ||
# allTests.addTest(test_p9) | ||
# allTests.addTest(test_efp) | ||
# allTests.addTest(test_root_coordinators) | ||
allTests.addTest(test_efp) | ||
allTests.addTest(test_root_coordinators) | ||
|
||
unittest.TextTestRunner(verbosity=2, failfast=True).run(allTests) | ||
|