click-textual
parent
9e37ff18c4
commit
79f088a86a
@ -0,0 +1,24 @@
|
|||||||
|
import os, sys, importlib, glob, inspect
|
||||||
|
|
||||||
|
class Disposition():
|
||||||
|
|
||||||
|
def __init__(self, context = None):
|
||||||
|
self._context = context
|
||||||
|
self._logger = context['logger']
|
||||||
|
self._reportLogger = context['report_logger']
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def list():
|
||||||
|
basePath = os.path.dirname(__file__)
|
||||||
|
return [os.path.basename(p)[9:-3]
|
||||||
|
for p
|
||||||
|
in glob.glob(f"{ basePath }/disposition_*.py", recursive = True)
|
||||||
|
if p != __file__]
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def getClassReference(identifier):
|
||||||
|
importlib.import_module(f"ffx.test.disposition_{ identifier }")
|
||||||
|
for name, obj in inspect.getmembers(sys.modules[f"ffx.test.disposition_{ identifier }"]):
|
||||||
|
#HINT: Excluding Disposition as it seems to be included by import (?)
|
||||||
|
if inspect.isclass(obj) and name != 'Disposition' and name.startswith('Disposition'):
|
||||||
|
return obj
|
Loading…
Reference in New Issue