58def varyValues (function, funcParams, fieldDict, parentChangeSet=None, verbose=True):
59 if not parentChangeSet:
60 parentChangeSet = TestHelper.getInstance().getChangeSet()
63 if len(fieldDict) == 0:
69 fieldName, fieldValues = fieldDict.popitem()
70 field = Base.getTestCaseContext().field(fieldName)
75 fieldValues = list(field.items())
77 changeSet =
TestHelper().getInstance().getChangeSet()
80 for fieldValue
in fieldValues:
81 changeSet.setFieldValue(fieldName, fieldValue, verbose=verbose)
82 varyValues(function, funcParams, fieldDict, changeSet, verbose)
86 fieldDict[fieldName] = fieldValues
143 testCase = fieldValueTestCaseSet.get(testCaseName)
144 testCase.applyParameterization(TestHelper.getInstance().getChangeSet(), verbose=verbose)
145 if not testCase.verifyExpectedResults(verbose=verbose):
146 Logging.error(
"Failed to verify expected results.", depth=1)
varyValues(function, funcParams, fieldDict, parentChangeSet=None, verbose=True)
Set field values and for each combination call the given function with the given parameters.