Skip to content

Commit

Permalink
made one testcase, managed to make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
AvocadoStyle committed Apr 3, 2023
1 parent 22eaf1a commit 1e4bad3
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 2 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
description='auto version controller product',
author_email='[email protected]',
url='https://github.com/AvocadoStyle/automation_infrastructure_prototype',
packages=find_packages(exclude=('testing_infra*',)
packages=find_packages(
))
Empty file added testing_infra/__init__.py
Empty file.
Empty file added testing_infra/model/__init__.py
Empty file.
14 changes: 14 additions & 0 deletions testing_infra/model/sources/VersionExecute.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import importlib
def print_out_version(app_name):
app_name = app_name.lower()
app_name = app_name.capitalize()
app_module = importlib.import_module(f'application.{app_name}')
app_name = app_name.upper()
context = ''
app_obj = getattr(app_module, app_name)(context, app_name)
exit_code, out = app_obj.build_app()
print(f'exitcode is: {exit_code}, out is: {out}')


print_out_version('BMW')

Empty file.
3 changes: 2 additions & 1 deletion testing_infra/model/sources/application/Application.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ def initialize_apps(self):
raise Exception(f'couldn\'t initialize the apps {e}')

def build_app(self):
self.run_app_process(self.__command)
return self.run_app_process(self.__command)

def run_app_process(self, cmd: list, timeout=1200):
try:
exit_code, out = utilities.run_process(cmd=cmd, timeout=timeout)
return exit_code, out
except Exception as e:
print(f'error {e}')
raise e
Expand Down
5 changes: 5 additions & 0 deletions testing_infra/model/sources/application/Bmw.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from testing_infra.model.sources.application.Application import ApplicationClass
class BMW(ApplicationClass):
def __init__(self, context, name):
super().__init__(context, name)

Empty file.
2 changes: 2 additions & 0 deletions testing_infra/model/tests/test_cases/test_basic_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
if __name__ == '__main__':
pass
Empty file.

0 comments on commit 1e4bad3

Please sign in to comment.