Updated docs
This commit is contained in:
@@ -2,15 +2,19 @@ from cpl_cli.abc.code_file_template_abc import CodeFileTemplateABC
|
||||
|
||||
|
||||
class ProjectFileTestApplication(CodeFileTemplateABC):
|
||||
|
||||
def __init__(self, path: str, use_application_api: bool, use_startup: bool, use_service_providing: bool, use_async: bool):
|
||||
CodeFileTemplateABC.__init__(self, 'application', path, '', use_application_api, use_startup, use_service_providing, use_async)
|
||||
def __init__(
|
||||
self, path: str, use_application_api: bool, use_startup: bool, use_service_providing: bool, use_async: bool
|
||||
):
|
||||
CodeFileTemplateABC.__init__(
|
||||
self, "application", path, "", use_application_api, use_startup, use_service_providing, use_async
|
||||
)
|
||||
|
||||
def get_code(self) -> str:
|
||||
import textwrap
|
||||
|
||||
if self._use_async:
|
||||
return textwrap.dedent("""\
|
||||
return textwrap.dedent(
|
||||
"""\
|
||||
import unittest
|
||||
from unittest import TestSuite
|
||||
|
||||
@@ -32,9 +36,11 @@ class ProjectFileTestApplication(CodeFileTemplateABC):
|
||||
async def main(self):
|
||||
runner = unittest.TextTestRunner()
|
||||
runner.run(self._suite)
|
||||
""")
|
||||
"""
|
||||
)
|
||||
|
||||
return textwrap.dedent("""\
|
||||
return textwrap.dedent(
|
||||
"""\
|
||||
import unittest
|
||||
from unittest import TestSuite
|
||||
|
||||
@@ -56,4 +62,5 @@ class ProjectFileTestApplication(CodeFileTemplateABC):
|
||||
def main(self):
|
||||
runner = unittest.TextTestRunner()
|
||||
runner.run(self._suite)
|
||||
""")
|
||||
"""
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user