You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
import os, sys, importlib, glob, inspect
|
|
|
|
class DispositionCombination2():
|
|
|
|
def __init__(self, context = None):
|
|
self._context = context
|
|
self._logger = context['logger']
|
|
self._reportLogger = context['report_logger']
|
|
|
|
def getIdentifier(self):
|
|
return self._combinationIdentifier
|
|
|
|
@staticmethod
|
|
def list():
|
|
basePath = os.path.dirname(__file__)
|
|
return [os.path.basename(p)[26:-3]
|
|
for p
|
|
in glob.glob(f"{ basePath }/disposition_combination_2_*.py", recursive = True)
|
|
if p != __file__]
|
|
|
|
@staticmethod
|
|
def getClassReference(identifier):
|
|
importlib.import_module(f"ffx.test.disposition_combination_2_{ identifier }")
|
|
for name, obj in inspect.getmembers(sys.modules[f"ffx.test.disposition_combination_2_{ identifier }"]):
|
|
#HINT: Excluding DispositionCombination as it seems to be included by import (?)
|
|
if inspect.isclass(obj) and name != 'DispositionCombination2' and name.startswith('DispositionCombination2'):
|
|
return obj
|