Just a few simple tests to ensure that the various status classes initialize.
Signed-off-by: Dylan Baker <[email protected]> --- framework/tests/status_tests.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/framework/tests/status_tests.py b/framework/tests/status_tests.py index cdc9989..3dbcc42 100644 --- a/framework/tests/status_tests.py +++ b/framework/tests/status_tests.py @@ -42,6 +42,25 @@ FIXES = itertools.combinations(reversed(STATUSES), 2) PROBLEMS = STATUSES[1:] +def check_initialize(stat): + """ Initialize the object """ + stt = status.status_lookup(stat) + assert stt + + +def test_gen_initialize(): + """ Generator that attempts to initialize all of the status classes + + This test relies on status.status_lookup working correctly + + """ + yieldable = check_initialize + + for stat in STATUSES + ['skip']: + yieldable.description = "Initialize {}".format(stat) + yield yieldable, stat + + def is_regression(x, y): # Test for regressions assert status.status_lookup(x) < status.status_lookup(y) -- 1.9.0 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
