Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
l8556 committed Sep 12, 2024
1 parent 2cbebc5 commit 2421ae6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frameworks/VboxMachine/VboxMachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from frameworks.decorators import vm_is_turn_on
from .vm_data import VmData
from tests.desktop_tests.tools.configs import VmConfig
from frameworks.VboxMachine.configs import VmConfig


class VboxMachine:
Expand Down
3 changes: 2 additions & 1 deletion frameworks/VboxMachine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from .VboxMachine import VboxMachine
from .configs import VmConfig

__all__ = [VboxMachine]
__all__ = [VboxMachine, VmConfig]
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class VmConfig:
cpus (int): The number of CPUs allocated for the system.
memory (int): The amount of memory in MB.
"""
def __init__(self, config_path: str = join(getcwd(), 'vm_config.json')):
def __init__(self, config_path: str):
self.config_path = config_path
self._config = self._load_config(self.config_path)
self.cpus = self._config.cpus
Expand Down
12 changes: 10 additions & 2 deletions frameworks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# -*- coding: utf-8 -*-
from .VboxMachine import VboxMachine
from .VboxMachine import VboxMachine, VmConfig
from console import MyConsole
from .decorators import vm_data_created, vm_is_turn_on, retry
from .report import Report

__all__ = [VboxMachine, MyConsole, Report, 'vm_data_created', 'vm_is_turn_on', 'retry']
__all__ = [
VboxMachine,
MyConsole,
Report,
VmConfig,
'vm_data_created',
'vm_is_turn_on',
'retry'
]

0 comments on commit 2421ae6

Please sign in to comment.