From 1952c70b81a45d78002ced0288e114bbce6bfcca Mon Sep 17 00:00:00 2001 From: Ekaterina Chernova Date: Mon, 21 Dec 2015 16:35:00 +0300 Subject: [PATCH] [test-runner] Put TestFixture class check to the right place Previously it was done during object instantiation and was useless. Change-Id: I10827d2006e11cb734ad436adbf8f56e02710780 Closes-Bug: #1528210 --- murano/cmd/test_runner.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/murano/cmd/test_runner.py b/murano/cmd/test_runner.py index 6924af6f..652f5177 100755 --- a/murano/cmd/test_runner.py +++ b/murano/cmd/test_runner.py @@ -134,13 +134,12 @@ class MuranoTestRunner(object): class_to_methods = {} for pkg_class_name in package.classes: class_obj = package.find_class(pkg_class_name, False) - - obj = class_obj.new(None, exc.object_store)(None) - if not helpers.is_instance_of(obj, BASE_CLASS, '*'): + base_class = package.find_class(BASE_CLASS) + if not base_class.is_compatible(class_obj): LOG.debug('Class {0} is not inherited from {1}. ' 'Skipping it.'.format(pkg_class_name, BASE_CLASS)) continue - + obj = class_obj.new(None, exc.object_store)(None) class_to_obj[pkg_class_name] = obj # Exclude methods, that are not test cases. tests = []