Tidy up logging and rework tests from scratch
This commit is contained in:
39
tests/legacy/permutation_combinator_3.py
Normal file
39
tests/legacy/permutation_combinator_3.py
Normal file
@@ -0,0 +1,39 @@
|
||||
class PermutationCombinator3():
|
||||
|
||||
IDENTIFIER = 'permutation3'
|
||||
|
||||
PERMUTATION_LIST = [
|
||||
[0,1,2],
|
||||
[0,2,1],
|
||||
[1,2,0]
|
||||
]
|
||||
|
||||
|
||||
def __init__(self, context = None):
|
||||
self._context = context
|
||||
self._logger = context['logger']
|
||||
self._reportLogger = context['report_logger']
|
||||
|
||||
def getIdentifier(self):
|
||||
return PermutationCombinator3.IDENTIFIER
|
||||
|
||||
|
||||
def getPayload(self, permutationIndex):
|
||||
return {
|
||||
'variant': f"P{permutationIndex}",
|
||||
'permutation': PermutationCombinator3.PERMUTATION_LIST[permutationIndex],
|
||||
'assertFunc': self.createAssertFunc(),
|
||||
'shouldFail': self.shouldFail()
|
||||
}
|
||||
|
||||
def createAssertFunc(self):
|
||||
def f(testObj = {}):
|
||||
pass
|
||||
return f
|
||||
|
||||
def shouldFail(self):
|
||||
return False
|
||||
|
||||
def getYield(self):
|
||||
for permutationIndex in range(len(PermutationCombinator3.PERMUTATION_LIST)):
|
||||
yield self.getPayload(permutationIndex)
|
||||
Reference in New Issue
Block a user