Tidy up logging and rework tests from scratch
This commit is contained in:
64
tests/legacy/_basename_combinator_1.py
Normal file
64
tests/legacy/_basename_combinator_1.py
Normal file
@@ -0,0 +1,64 @@
|
||||
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
|
||||
Reference in New Issue
Block a user