[Piglit] [PATCH 41/42] glsl_parser_test_tests.py: use utils instead of raise AssertionError
Dylan Baker
baker.dylan.c at gmail.com
Wed Apr 22 15:10:30 PDT 2015
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
framework/tests/glsl_parser_test_tests.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/framework/tests/glsl_parser_test_tests.py b/framework/tests/glsl_parser_test_tests.py
index ce36281..0bb0557 100644
--- a/framework/tests/glsl_parser_test_tests.py
+++ b/framework/tests/glsl_parser_test_tests.py
@@ -235,6 +235,7 @@ def test_bad_section_name():
'glslparser test config block'.format(tfile))
+ at utils.not_raises(glsl.GLSLParserError)
def test_good_section_names():
"""test.glsl_parser_test.GLSLParserTest: A section name in the _CONFIG_KEYS does not raise an error"""
content = ('// [config]\n'
@@ -244,10 +245,7 @@ def test_good_section_names():
'// check_link: True\n'
'// [end config]\n')
- try:
- _check_config(content)
- except glsl.GLSLParserException as e:
- raise AssertionError(e)
+ _check_config(content)
def check_no_duplicates(content, dup):
@@ -287,7 +285,7 @@ def check_bad_character(tfile):
# Obviously this isn't a perfect check, but it should be close enough
if not e.exception.message.startswith('Bad character "'):
- raise AssertionError(e.exception)
+ raise utils.TestFailure(e.exception)
@utils.nose_generator
--
2.3.5
More information about the Piglit
mailing list