From 96fb6a8b65dbaa480a4e6afac1f2f9f176d4b801 Mon Sep 17 00:00:00 2001 From: Artem Panchenko Date: Fri, 6 May 2016 13:00:15 +0300 Subject: [PATCH] Don't process pre-checks methods like test cases Change-Id: Id2e604a085239d0f7a8c5ad45454f3659a18f025 --- fuelweb_test/testrail/upload_cases_description.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fuelweb_test/testrail/upload_cases_description.py b/fuelweb_test/testrail/upload_cases_description.py index 83c2e33d9..efe5b0d0b 100644 --- a/fuelweb_test/testrail/upload_cases_description.py +++ b/fuelweb_test/testrail/upload_cases_description.py @@ -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