2022.6 #88
@ -1,25 +0,0 @@
|
||||
import unittest
|
||||
|
||||
from cpl_query.tests.iterable_test import IterableTest
|
||||
from cpl_query.tests.query_test import QueryTest
|
||||
|
||||
|
||||
class Tester:
|
||||
|
||||
def __init__(self):
|
||||
self._suite = unittest.TestSuite()
|
||||
|
||||
def create(self):
|
||||
loader = unittest.TestLoader()
|
||||
self._suite.addTests(loader.loadTestsFromTestCase(QueryTest))
|
||||
self._suite.addTests(loader.loadTestsFromTestCase(IterableTest))
|
||||
|
||||
def start(self):
|
||||
runner = unittest.TextTestRunner()
|
||||
runner.run(self._suite)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
tester = Tester()
|
||||
tester.create()
|
||||
tester.start()
|
@ -4,6 +4,7 @@ from cpl_core.application import ApplicationABC
|
||||
from cpl_core.configuration import ConfigurationABC
|
||||
from cpl_core.dependency_injection import ServiceProviderABC
|
||||
from unittests_cli.cli_test_suite import CLITestSuite
|
||||
from unittests_query.query_test_suite import QueryTestSuite
|
||||
|
||||
|
||||
class Application(ApplicationABC):
|
||||
@ -17,3 +18,4 @@ class Application(ApplicationABC):
|
||||
def main(self):
|
||||
runner = unittest.TextTestRunner()
|
||||
runner.run(CLITestSuite())
|
||||
runner.run(QueryTestSuite())
|
||||
|
@ -3,7 +3,7 @@ import unittest
|
||||
from cpl_query.extension.list import List
|
||||
|
||||
|
||||
class IterableTest(unittest.TestCase):
|
||||
class IterableTestCase(unittest.TestCase):
|
||||
|
||||
def setUp(self) -> None:
|
||||
self._list = List(int)
|
@ -5,10 +5,10 @@ from random import randint
|
||||
from cpl_core.utils import String
|
||||
from cpl_query.exceptions import InvalidTypeException, ArgumentNoneException
|
||||
from cpl_query.extension.list import List
|
||||
from cpl_query.tests.models import User, Address
|
||||
from unittests_query.models import User, Address
|
||||
|
||||
|
||||
class QueryTest(unittest.TestCase):
|
||||
class QueryTestCase(unittest.TestCase):
|
||||
|
||||
def setUp(self) -> None:
|
||||
self._tests = List(User)
|
17
unittests/unittests_query/query_test_suite.py
Normal file
17
unittests/unittests_query/query_test_suite.py
Normal file
@ -0,0 +1,17 @@
|
||||
import unittest
|
||||
|
||||
from unittests_query.iterable_test_case import IterableTestCase
|
||||
from unittests_query.query_test_case import QueryTestCase
|
||||
|
||||
|
||||
class QueryTestSuite(unittest.TestSuite):
|
||||
|
||||
def __init__(self):
|
||||
unittest.TestSuite.__init__(self)
|
||||
|
||||
loader = unittest.TestLoader()
|
||||
self.addTests(loader.loadTestsFromTestCase(QueryTestCase))
|
||||
self.addTests(loader.loadTestsFromTestCase(IterableTestCase))
|
||||
|
||||
def run(self, *args):
|
||||
super().run(*args)
|
Loading…
Reference in New Issue
Block a user