2022.6.17 - Unittests #84
@ -30,20 +30,20 @@ class CLITestSuite(unittest.TestSuite):
|
|||||||
|
|
||||||
active_tests = [
|
active_tests = [
|
||||||
# nothing needed
|
# nothing needed
|
||||||
GenerateTestCase,
|
# GenerateTestCase,
|
||||||
NewTestCase,
|
# NewTestCase,
|
||||||
# compare console output
|
# compare console output
|
||||||
# VersionTestCase,
|
# VersionTestCase,
|
||||||
# project needed
|
# project needed
|
||||||
BuildTestCase,
|
# BuildTestCase,
|
||||||
PublishTestCase,
|
# PublishTestCase,
|
||||||
RunTestCase,
|
# RunTestCase,
|
||||||
StartTestCase,
|
StartTestCase,
|
||||||
# check in project settings if package is updated
|
# check in project settings if package is updated
|
||||||
# UpdateTestCase,
|
# UpdateTestCase,
|
||||||
# workspace needed
|
# workspace needed
|
||||||
AddTestCase,
|
# AddTestCase,
|
||||||
RemoveTestCase
|
# RemoveTestCase
|
||||||
]
|
]
|
||||||
|
|
||||||
if self._is_online:
|
if self._is_online:
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from cpl_core.utils import String
|
from cpl_core.utils import String
|
||||||
@ -68,7 +69,8 @@ class StartTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
def test_start(self):
|
def test_start(self):
|
||||||
thread = StartTestThread()
|
thread = StartTestThread()
|
||||||
thread.run()
|
thread.start()
|
||||||
|
time.sleep(1)
|
||||||
settings = self._get_appsettings()
|
settings = self._get_appsettings()
|
||||||
self.assertNotEqual(settings, {})
|
self.assertNotEqual(settings, {})
|
||||||
self.assertIn('RunTest', settings)
|
self.assertIn('RunTest', settings)
|
||||||
@ -82,6 +84,8 @@ class StartTestCase(unittest.TestCase):
|
|||||||
file.write(f'# trigger restart (comment generated by unittest)')
|
file.write(f'# trigger restart (comment generated by unittest)')
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
settings = self._get_appsettings()
|
settings = self._get_appsettings()
|
||||||
self.assertNotEqual(settings, {})
|
self.assertNotEqual(settings, {})
|
||||||
self.assertIn('RunTest', settings)
|
self.assertIn('RunTest', settings)
|
||||||
|
@ -9,4 +9,4 @@ class StartTestThread(threading.Thread):
|
|||||||
threading.Thread.__init__(self, daemon=True)
|
threading.Thread.__init__(self, daemon=True)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
CLICommands.start()
|
CLICommands.start(True)
|
||||||
|
Loading…
Reference in New Issue
Block a user