提交 5dd5a262 编写于 作者: C Cleber Rosa

Test Loader: test class is a string for avocado instrumented tests

With the changes that now do not load the test at discovery time,
the test class is a string with the class name, and not a class
itself.

Therefore, this discovery test is only going to check for the test
class name. Other test may be added to do the real module load and
test class instantiation.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 98f2d6a1
......@@ -89,11 +89,7 @@ class LoaderTest(unittest.TestCase):
avocado_pass_test.save()
test_class, test_parameters = (
self.loader.discover(avocado_pass_test.path, True)[0])
self.assertTrue(str(test_class) == "<class 'passtest.PassTest'>",
str(test_class))
self.assertTrue(issubclass(test_class, test.Test))
tc = test_class(**test_parameters)
tc.test()
self.assertTrue(test_class == 'PassTest', test_class)
avocado_pass_test.remove()
def test_load_not_a_test(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册