提交 d00da48c 编写于 作者: L Lukáš Doktor

selftests: Add unittest to load simple tests with arguments

This patch adds unittest for loading simple tests with arguments.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 0ba51736
......@@ -133,6 +133,11 @@ class LoaderTest(unittest.TestCase):
self.assertTrue(test_class == test.SimpleTest, test_class)
tc = test_class(**test_parameters)
tc.test()
# Load with params
simple_with_params = simple_test.path + " 'foo bar' --baz"
suite = self.loader.discover(simple_with_params, True)
self.assertEqual(len(suite), 1)
self.assertEqual(suite[0][1]["name"], simple_with_params)
simple_test.remove()
def test_load_simple_not_exec(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册