Lines Matching refs:varlist
26 def exists_validvals(self, varname, varlist, validlist): argument
27 self.assertIn(varname, varlist)
28 self.assertIn(varlist[varname], validlist)
29 return varlist[varname]
31 def exists_yes_no(self, varname, varlist): argument
32 return self.exists_validvals(varname, varlist, ["yes", "no"])
34 def exists_nonempty(self, varname, varlist): argument
35 self.assertIn(varname, varlist)
36 self.assertGreater(len(varlist[varname]), 0)
37 return varlist[varname]
39 def exists_integer(self, varname, varlist, base=10): argument
41 self.assertIn(varname, varlist)
43 val = int(varlist[varname], base)
45 self.fail("%s (%s) is not an integer" % (varname, varlist[varname]))