Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ntdaley opened this issue Jul 14, 2017 · 0 comments

Comments

@ntdaley
Copy link

ntdaley commented Jul 14, 2017

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant