Previously the code read a StringIO, then immediately created a new one to write the read text into. This is silly, by just setting the tell back to position 0 the same effect can be had without the need to read and write the contents.
Signed-off-by: Dylan Baker <[email protected]> --- framework/glsl_parser_test.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/framework/glsl_parser_test.py b/framework/glsl_parser_test.py index 157412f..624df68 100644 --- a/framework/glsl_parser_test.py +++ b/framework/glsl_parser_test.py @@ -105,9 +105,8 @@ class GLSLParserTest(PiglitTest): defaults={'require_extensions': '', 'check_link': 'false'}) # Verify that the config was valid - text = text_io.getvalue() - text_io.close() - config.readfp(StringIO(text)) + text_io.seek(0) + config.readfp(text_io) for opt in ['expect_result', 'glsl_version']: if not config.has_option('config', opt): -- 2.0.2 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
