robotframework-lint icon indicating copy to clipboard operation
robotframework-lint copied to clipboard

is_templated does not pay attention to [Template] setting on the test itself

Open ntdaley opened this issue 7 years ago • 0 comments

Currently this won't pay attention to the [Template] setting on the test itself, only to the 'Test Template' setting on the parent file. (Also doesn't account for colon in the parent suite's setting name)

should probably be updated to something like:

@property
def is_templated(self):
    """Return True if the test is part of a suite that uses a Test Template"""
    for setting in self.settings:
        if setting[1].lower() == '[template]':
            return True
    for table in self.parent.tables:
        if isinstance(table, SettingTable):
            for row in table.rows:
                if row[0].lower().rstrip(':') == "test template":
                    return True
    return False

ntdaley avatar Jul 14 '17 09:07 ntdaley