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.
ffx/bin/ffx/test/track_combination.py

28 lines
1.0 KiB
Python

import os, sys, importlib, glob, inspect
class TrackCombination():
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)[18:-3]
for p
in glob.glob(f"{ basePath }/track_combination_*.py", recursive = True)
if p != __file__]
@staticmethod
def getClassReference(identifier):
importlib.import_module(f"ffx.test.track_combination_{ identifier }")
for name, obj in inspect.getmembers(sys.modules[f"ffx.test.track_combination_{ identifier }"]):
#HINT: Excluding DispositionCombination as it seems to be included by import (?)
if inspect.isclass(obj) and name != 'TrackCombination' and name.startswith('TrackCombination'):
return obj