Merge "[test-runner] Put TestFixture class check to the right place"
This commit is contained in:
commit
2a88aee169
@ -134,13 +134,12 @@ class MuranoTestRunner(object):
|
|||||||
class_to_methods = {}
|
class_to_methods = {}
|
||||||
for pkg_class_name in package.classes:
|
for pkg_class_name in package.classes:
|
||||||
class_obj = package.find_class(pkg_class_name, False)
|
class_obj = package.find_class(pkg_class_name, False)
|
||||||
|
base_class = package.find_class(BASE_CLASS)
|
||||||
obj = class_obj.new(None, exc.object_store)(None)
|
if not base_class.is_compatible(class_obj):
|
||||||
if not helpers.is_instance_of(obj, BASE_CLASS, '*'):
|
|
||||||
LOG.debug('Class {0} is not inherited from {1}. '
|
LOG.debug('Class {0} is not inherited from {1}. '
|
||||||
'Skipping it.'.format(pkg_class_name, BASE_CLASS))
|
'Skipping it.'.format(pkg_class_name, BASE_CLASS))
|
||||||
continue
|
continue
|
||||||
|
obj = class_obj.new(None, exc.object_store)(None)
|
||||||
class_to_obj[pkg_class_name] = obj
|
class_to_obj[pkg_class_name] = obj
|
||||||
# Exclude methods, that are not test cases.
|
# Exclude methods, that are not test cases.
|
||||||
tests = []
|
tests = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user