Skip to content
Snippets Groups Projects
Commit 2271b2c7 authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

implement getInstance class method to pass test_get_instance fix #5

parent 4f85b9ee
No related branches found
No related tags found
1 merge request!3Resolve "getInstance implementieren"
class ConfigProvider: class ConfigProvider:
_instance = None
@classmethod
def getInstance(cls):
return ConfigProvider._instance
def __init__(self, load_function): def __init__(self, load_function):
self._conf_dict = load_function['function']( self._conf_dict = load_function['function'](
*load_function.get('args'), **load_function.get('kwargs')) *load_function.get('args'), **load_function.get('kwargs'))
self._load_function = load_function self._load_function = load_function
ConfigProvider._instance = self
@property @property
def dict(self): def dict(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment