Improved tests

This commit is contained in:
2022-05-26 15:29:49 +02:00
parent d937c4c0e6
commit a72dd0dc2e
6 changed files with 25 additions and 15 deletions

View File

@@ -1,18 +1,15 @@
import os.path
import unittest
from unittests_cli.constants import PLAYGROUND
from unittests_cli.constants import PLAYGROUND_PATH
from unittests_shared.cli_commands import CLICommands
class GenerateTestCase(unittest.TestCase):
def setUp(self):
pass
def _test_file(self, schematic: str, suffix: str):
CLICommands.generate(schematic, 'GeneratedFile')
file_path = os.path.abspath(os.path.join(PLAYGROUND, f'generated_file{suffix}.py'))
file_path = os.path.abspath(os.path.join(PLAYGROUND_PATH, f'generated_file{suffix}.py'))
file_exists = os.path.exists(file_path)
self.assertTrue(file_exists)
os.remove(file_path)