[Piglit] [PATCH 3/3] framework/test/shader_test.py: Remove redundant workaround for python 3.3 mock

Rhys Kidd rhyskidd at gmail.com
Tue Aug 7 01:53:47 UTC 2018


As python 3.3 is deprecated and no longer supported by piglit, remove redundant workaround
for lack of readlines() support with mock in python 3.3.

Signed-off-by: Rhys Kidd <rhyskidd at gmail.com>
---
 framework/test/shader_test.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/framework/test/shader_test.py b/framework/test/shader_test.py
index de3e92f4b..680ae2d6b 100644
--- a/framework/test/shader_test.py
+++ b/framework/test/shader_test.py
@@ -68,9 +68,7 @@ class Parser(object):
         # an exception. The second looks for the GL version or raises an
         # exception
         with io.open(os.path.join(ROOT_DIR, self.filename), 'r', encoding='utf-8') as shader_file:
-            # The mock in python 3.3 doesn't support readlines(), so use
-            # read().split() as a workaround
-            lines = (l for l in shader_file.read().split('\n'))
+            lines = (l for l in shader_file.readlines())
 
             # Find the config section
             for line in lines:
-- 
2.17.1



More information about the Piglit mailing list