[Piglit] [PATCH 30/42] test_lists.py: simplify these tests.

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


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/tests/test_lists.py | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/framework/tests/test_lists.py b/framework/tests/test_lists.py
index c96248b..25179e9 100644
--- a/framework/tests/test_lists.py
+++ b/framework/tests/test_lists.py
@@ -38,20 +38,16 @@ import framework.tests.utils as utils
 @utils.nose_generator
 def gen_test_import():
     """ Generates a bunch of tests to import the various test modules """
-    # Test the various OpenGL modules
-    for module in ['all', 'quick', 'gpu', 'sanity', 'cpu', 'llvmpipe']:
-        check_import.description = "Test import of tests.{}".format(module)
-        yield check_import, "tests." + module
+    def check_import(module):
+        """ Test that a module can be imported """
+        if not path.exists('bin'):
+            raise SkipTest(
+                "Piglit has not been compiled, this test will not work")
+
+        importlib.import_module(module)
 
-    # Test the various OpenCL modules
-    for module in ['cl', 'quick_cl']:
+    # Test the various OpenGL modules
+    for module in ['all', 'quick', 'gpu', 'sanity', 'cpu', 'llvmpipe', 'cl',
+                   'quick_cl']:
         check_import.description = "Test import of tests.{}".format(module)
         yield check_import, "tests." + module
-
-
-def check_import(module):
-    """ Test that a module can be imported """
-    if not path.exists('bin'):
-        raise SkipTest("Piglit has not been compiled, this test will not work")
-
-    importlib.import_module(module)
-- 
2.3.5



More information about the Piglit mailing list