提交 e8575363 编写于 作者: A Amador Pahim

tests: add subtests filter functional test

Test to cover the fixes in subtests filter. The filter
should work in a directory discovery for both INSTRUMENTED
and SIMPLE tests.
Signed-off-by: NAmador Pahim <apahim@redhat.com>
上级 27661323
......@@ -350,6 +350,19 @@ class LoaderTestFunctional(unittest.TestCase):
self.assertFalse(exps, "Some expected result not matched to actual"
"results:\n%s\n\nexps = %s" % (result, exps))
def test_list_subtests_filter(self):
"""
Check whether the subtests filter works for both INSTRUMENTED
and SIMPLE in a directory list.
"""
cmd = "%s list examples/tests/:fail" % AVOCADO
result = process.run(cmd)
expected = ("INSTRUMENTED examples/tests/doublefail.py:DoubleFail.test\n"
"INSTRUMENTED examples/tests/fail_on_exception.py:FailOnException.test\n"
"INSTRUMENTED examples/tests/failtest.py:FailTest.test\n"
"SIMPLE examples/tests/failtest.sh\n")
self.assertEqual(expected, result.stdout)
def tearDown(self):
shutil.rmtree(self.tmpdir)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册