Improved cpl g templating & added custom templating #137
This commit is contained in:
33
src/cpl_cli/.cpl/test_case_schematic.py
Normal file
33
src/cpl_cli/.cpl/test_case_schematic.py
Normal file
@@ -0,0 +1,33 @@
|
||||
import textwrap
|
||||
|
||||
from cpl_cli.abc.generate_schematic_abc import GenerateSchematicABC
|
||||
|
||||
|
||||
class TestCase(GenerateSchematicABC):
|
||||
|
||||
def __init__(self, *args: str):
|
||||
GenerateSchematicABC.__init__(self, *args)
|
||||
|
||||
def get_code(self) -> str:
|
||||
code = """\
|
||||
import unittest
|
||||
|
||||
|
||||
class $Name(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def test_equal(self):
|
||||
pass
|
||||
"""
|
||||
x = self.build_code_str(code, Name=self._class_name)
|
||||
return x
|
||||
|
||||
@classmethod
|
||||
def register(cls):
|
||||
GenerateSchematicABC.register(
|
||||
cls,
|
||||
'test-case',
|
||||
['tc', 'TC']
|
||||
)
|
||||
Reference in New Issue
Block a user