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.
64 lines
1.8 KiB
Python
64 lines
1.8 KiB
Python
import os, sys, importlib, glob, inspect, itertools
|
|
|
|
from ffx.track_type import TrackType
|
|
|
|
from ffx.track_descriptor import TrackDescriptor
|
|
from ffx.media_descriptor import MediaDescriptor
|
|
|
|
from .basename_combinator import BasenameCombinator
|
|
|
|
from .indicator_combinator import IndicatorCombinator
|
|
from .label_combinator import LabelCombinator
|
|
|
|
class BasenameCombinator2(BasenameCombinator):
|
|
"""documentation_site"""
|
|
|
|
VARIANT = 'B2'
|
|
|
|
# def __init__(self, SubCombinators: dict = {}, context = None):
|
|
def __init__(self, context = None):
|
|
|
|
self._context = context
|
|
self._logger = context['logger']
|
|
self._reportLogger = context['report_logger']
|
|
|
|
def getVariant(self):
|
|
return BasenameCombinator2.VARIANT
|
|
|
|
def getPayload(self):
|
|
return ''
|
|
|
|
def assertFunc(self, mediaDescriptor: MediaDescriptor):
|
|
pass
|
|
|
|
def shouldFail(self):
|
|
return False
|
|
|
|
def getYield(self):
|
|
|
|
for L in LabelCombinator.getAllClassReferences():
|
|
# for I in IndicatorCombinator.getAllClassReferences():
|
|
# for S in SiteCombinator.getAllClassReferences():
|
|
# for T in TitleCombinator.getAllClassReferences():
|
|
#
|
|
|
|
l = L(self._context)
|
|
|
|
yieldObj = {}
|
|
|
|
yieldObj['identifier'] = self.getIdentifier()
|
|
|
|
yieldObj['variants'] = [self.getVariant(),
|
|
l.getVariant()]
|
|
|
|
yieldObj['payload'] = {'label': l.getPayload()}
|
|
|
|
yieldObj['assertSelectors'] = ['B', 'L']
|
|
|
|
yieldObj['assertFuncs'] = [self.assertFunc,
|
|
l.assertFunc]
|
|
|
|
yieldObj['shouldFail'] = (self.shouldFail()
|
|
| l.shouldFail())
|
|
|
|
yield yieldObj |