Currently a comparison like this will raise an error: framework.status.Pass() in ['pass']
This patch adds a test for this bug Signed-off-by: Dylan Baker <[email protected]> --- framework/tests/status_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/framework/tests/status_tests.py b/framework/tests/status_tests.py index 3dbcc42..0ecb522 100644 --- a/framework/tests/status_tests.py +++ b/framework/tests/status_tests.py @@ -61,6 +61,14 @@ def test_gen_initialize(): yield yieldable, stat +def test_status_in(): + """ A status can be compared to a str with `x in container` syntax """ + stat = status.Pass() + slist = ['pass'] + + assert stat in slist + + 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
