Don't process pre-checks methods like test cases

Change-Id: Id2e604a085239d0f7a8c5ad45454f3659a18f025
This commit is contained in:
Artem Panchenko 2016-05-06 13:00:15 +03:00
parent bacf0c2f9c
commit 15a7cc7f29
1 changed files with 8 additions and 0 deletions

View File

@ -203,6 +203,14 @@ def _is_case_processable(case, tests):
any([test[GROUP_FIELD] == parent_home.__name__ for test in tests]):
return False
# Skip @before_class methods without doc strings:
# they are just pre-checks, not separate tests cases
if case.entry.info.before_class:
if case.entry.home.func_doc is None:
logger.debug('Skipping method "{0}", because it is not a '
'test case'.format(case.entry.home.func_name))
return False
return True