TeuthologyContextPlugin: Parametrize conditionally
So that this plugin can be compatible with our unit tests.
@@ -37,6 +37,8 @@ class TeuthologyContextPlugin(object):
# this is pytest hook for generating tests with custom parameters
def pytest_generate_tests(self, metafunc):
# pass the teuthology ctx and config to each test method
+ if "ctx" in metafunc.fixturenames and \
+ "config" in metafunc.fixturenames:
metafunc.parametrize(["ctx", "config"], [(self.ctx, self.config),])
# log the outcome of each test
