Specifically TestResult should convert a 'result' value into a status.Status derived object.
Signed-off-by: Dylan Baker <[email protected]> --- framework/tests/core_tests.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/framework/tests/core_tests.py b/framework/tests/core_tests.py index dc33fdf..f63184e 100644 --- a/framework/tests/core_tests.py +++ b/framework/tests/core_tests.py @@ -27,6 +27,7 @@ import collections import json import framework.tests.utils as utils import framework.core as core +import framework.status as status def check_initialize(target): @@ -143,3 +144,11 @@ def test_load_results_file(): with utils.resultfile() as tfile: results = core.load_results(tfile.name) assert results + + +def test_testresult_to_status(): + """ TestResult initialized with result key converts the value to a Status + """ + result = core.TestResult({'result': 'pass'}) + assert isinstance(result['result'], status.Status), \ + "Result key not converted to a status object" -- 1.9.0 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
