X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Fautogen%2FTestcase.py;fp=resources%2Flibraries%2Fpython%2Fautogen%2FTestcase.py;h=7d0a29b0ad5c171583d61c5272de92286e5ab6b6;hp=dd58547f3396e47544cbe36f53c5c3b12e22f434;hb=5e6145a4260ffce1c302e94b9b241851f90838e1;hpb=5221220aa5a893e93d78ba31f84b0ad4d6245ec3 diff --git a/resources/libraries/python/autogen/Testcase.py b/resources/libraries/python/autogen/Testcase.py index dd58547f33..7d0a29b0ad 100644 --- a/resources/libraries/python/autogen/Testcase.py +++ b/resources/libraries/python/autogen/Testcase.py @@ -34,29 +34,29 @@ class Testcase(object): """ self.template = Template(template_string) - def generate(self, num, framesize, phy_cores): + def generate(self, num, frame_size, phy_cores): """Return string of test case code with placeholders filled. Fail if there are placeholders left unfilled. :param num: Test case number. Example value: 4. - :param framesize: Imix string or numeric frame size. Example: 74. + :param frame_size: Imix string or numeric frame size. Example: 74. :param phy_cores: Number of physical cores to use. Example: 2. :type num: int - :type framesize: str or int + :type frame_size: str or int :type phy_cores: int or str :returns: Filled template, usable as test case code. :rtype: str """ try: - fsize = int(framesize) + fsize = int(frame_size) subst_dict = { "frame_num": "${%d}" % fsize, "frame_str": "%dB" % fsize } except ValueError: # Assuming an IMIX string. subst_dict = { - "frame_num": str(framesize), + "frame_num": str(frame_size), "frame_str": "IMIX" } cores_str = str(phy_cores)