[Piglit] [PATCH 4/7] framework/tests/status.py: Add test for status in list syntax
Dylan Baker
baker.dylan.c at gmail.com
Fri Feb 28 15:43:00 PST 2014
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 <baker.dylan.c at gmail.com>
---
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
More information about the Piglit
mailing list