[Piglit] [PATCH 12/42] gleantest_tests.py: fix test names

Dylan Baker baker.dylan.c at gmail.com
Wed Apr 22 15:10:01 PDT 2015


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/tests/gleantest_tests.py | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/framework/tests/gleantest_tests.py b/framework/tests/gleantest_tests.py
index 26872b0..7c13ca3 100644
--- a/framework/tests/gleantest_tests.py
+++ b/framework/tests/gleantest_tests.py
@@ -22,17 +22,21 @@
 
 from __future__ import print_function, absolute_import
 
+import nose.tools as nt
+
 from framework.test import GleanTest
+from framework.tests import utils
 
 
+ at utils.no_error
 def test_initialize_gleantest():
-    """ Test that GleanTest initilizes """
-    test = GleanTest('name')
-    assert test
+    """test.gleantest.GleanTest: class initializes correctly"""
+    GleanTest('name')
 
 
 def test_GLOBAL_PARAMS_assignment():
-    """ Test to ensure that GleanTest.GLOBAL_PARAMS are correctly assigned
+    """test.gleantest.GleanTest: GLOBAL_PARAMS apply to instances created
+    after GLABL_PARAMS is set
 
     Specifically this tests for a bug where GLOBAL_PARAMS only affected
     instances of GleanTest created after GLOBAL_PARAMS were set, so changing the
@@ -47,11 +51,11 @@ def test_GLOBAL_PARAMS_assignment():
     test1 = GleanTest('basic')
     GleanTest.GLOBAL_PARAMS = ['--quick']
     test2 = GleanTest('basic')
-    assert test1.command == test2.command
+    nt.assert_list_equal(test1.command, test2.command)
 
 
 def test_bad_returncode():
-    """ Result is 'Fail' when returncode is not 0
+    """test.gleantest.GleanTest: If returncode is 0 the result is 'fail'
 
     Currently clean returns 127 if piglit can't find it's libs (LD_LIBRARY_PATH
     isn't set properly), and then marks such tests as pass, when they obviously
@@ -61,4 +65,5 @@ def test_bad_returncode():
     test = GleanTest('basic')
     test.result['returncode'] = 1
     test.interpret_result()
-    assert test.result['result'] == 'fail', "Result should have been fail"
+    nt.assert_equal(test.result['result'], 'fail',
+                    msg="Result should have been fail")
-- 
2.3.5



More information about the Piglit mailing list