[Piglit] [PATCH 17/42] piglit_test_tests.py: fix test names

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


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/tests/piglit_test_tests.py | 37 +++++++++++++++++-------------------
 1 file changed, 17 insertions(+), 20 deletions(-)

diff --git a/framework/tests/piglit_test_tests.py b/framework/tests/piglit_test_tests.py
index 764a9c6..b65945a 100644
--- a/framework/tests/piglit_test_tests.py
+++ b/framework/tests/piglit_test_tests.py
@@ -24,28 +24,25 @@ from __future__ import print_function, absolute_import
 
 import nose.tools as nt
 
+from framework.tests import utils
 from framework.test.piglit_test import (PiglitBaseTest, PiglitGLTest,
                                         PiglitCLTest)
 
 
+ at utils.no_error
 def test_initialize_piglitgltest():
-    """ Test that PiglitGLTest initializes correctly """
-    try:
-        PiglitGLTest(['/bin/true'])
-    except Exception as e:
-        raise AssertionError(e)
+    """test.piglit_test.PiglitGLTest: Class initializes"""
+    PiglitGLTest(['/bin/true'])
 
 
+ at utils.no_error
 def test_initialize_piglitcltest():
-    """ Test that PiglitCLTest initializes correctly """
-    try:
-        PiglitCLTest(['/bin/true'])
-    except Exception as e:
-        raise AssertionError(e)
+    """test.piglit_test.PiglitCLTest: Class initializes"""
+    PiglitCLTest(['/bin/true'])
 
 
 def test_piglittest_interpret_result():
-    """ PiglitBaseTest.interpret_result() works no subtests """
+    """test.piglit_test.PiglitBaseTest.interpret_result(): works no subtests"""
     test = PiglitBaseTest(['foo'])
     test.result['out'] = 'PIGLIT: {"result": "pass"}\n'
     test.interpret_result()
@@ -53,7 +50,7 @@ def test_piglittest_interpret_result():
 
 
 def test_piglittest_interpret_result_subtest():
-    """ PiglitBaseTest.interpret_result() works with subtests """
+    """test.piglit_test.PiglitBaseTest.interpret_result(): works with subtests"""
     test = PiglitBaseTest(['foo'])
     test.result['out'] = ('PIGLIT: {"result": "pass"}\n'
                           'PIGLIT: {"subtest": {"subtest": "pass"}}\n')
@@ -62,7 +59,7 @@ def test_piglittest_interpret_result_subtest():
 
 
 def test_piglitest_no_clobber():
-    """ PiglitBaseTest.interpret_result() does not clobber subtest entires """
+    """test.piglit_test.PiglitBaseTest.interpret_result(): does not clobber subtest entires"""
     test = PiglitBaseTest(['a', 'command'])
     test.result['out'] = (
         'PIGLIT: {"result": "pass"}\n'
@@ -76,20 +73,20 @@ def test_piglitest_no_clobber():
 
 
 def test_piglittest_command_getter_serial():
-    """ PiglitGLTest.command adds -auto to serial tests """
+    """test.piglit_test.PiglitGLTest.command: adds -auto to serial tests"""
     test = PiglitGLTest(['foo'])
     nt.assert_in('-auto', test.command)
 
 
 def test_piglittest_command_getter_concurrent():
-    """ PiglitGLTest.command adds -fbo and -auto to concurrent tests """
+    """test.piglit_test.PiglitGLTest.command: adds -fbo and -auto to concurrent tests"""
     test = PiglitGLTest(['foo'], run_concurrent=True)
     nt.assert_in('-auto', test.command)
     nt.assert_in('-fbo', test.command)
 
 
 def test_PiglitGLTest_include_and_exclude():
-    """PiglitGLTest.is_skip() raises if include and exclude are given."""
+    """test.piglit_test.PiglitGLTest.is_skip(): raises if include and exclude are given."""
     with nt.assert_raises(AssertionError):
         PiglitGLTest(['foo'],
                      require_platforms=['glx'],
@@ -97,28 +94,28 @@ def test_PiglitGLTest_include_and_exclude():
 
 
 def test_PiglitGLTest_platform_in_require():
-    """PiglitGLTest.is_skip() does not skip if platform is in require_platforms."""
+    """test.piglit_test.PiglitGLTest.is_skip(): does not skip if platform is in require_platforms"""
     PiglitGLTest.OPTS.env['PIGLIT_PLATFORM'] = 'glx'
     test = PiglitGLTest(['foo'], require_platforms=['glx'])
     nt.assert_false(test.is_skip())
 
 
 def test_PiglitGLTest_platform_not_in_require():
-    """PiglitGLTest.is_skip() skips if platform is not in require_platforms."""
+    """test.piglit_test.PiglitGLTest.is_skip(): skips if platform is not in require_platforms"""
     PiglitGLTest.OPTS.env['PIGLIT_PLATFORM'] = 'gbm'
     test = PiglitGLTest(['foo'], require_platforms=['glx'])
     nt.assert_true(test.is_skip())
 
 
 def test_PiglitGLTest_platform_in_exclude():
-    """PiglitGLTest.is_skip() skips if platform is in exclude_platforms.."""
+    """test.piglit_test.PiglitGLTest.is_skip(): skips if platform is in exclude_platforms"""
     PiglitGLTest.OPTS.env['PIGLIT_PLATFORM'] = 'glx'
     test = PiglitGLTest(['foo'], exclude_platforms=['glx'])
     nt.assert_true(test.is_skip())
 
 
 def test_PiglitGLTest_platform_not_in_exclude():
-    """PiglitGLTest.is_skip() does not skip if platform is in exclude_platforms."""
+    """test.piglit_test.PiglitGLTest.is_skip(): does not skip if platform is in exclude_platforms"""
     PiglitGLTest.OPTS.env['PIGLIT_PLATFORM'] = 'gbm'
     test = PiglitGLTest(['foo'], exclude_platforms=['glx'])
     nt.assert_false(test.is_skip())
-- 
2.3.5



More information about the Piglit mailing list