[Piglit] [PATCH 07/44] framework: use six.moves.zip
baker.dylan.c at gmail.com
baker.dylan.c at gmail.com
Wed Jan 27 16:06:15 PST 2016
From: Dylan Baker <baker.dylan.c at gmail.com>
This is itertools.izip on python 2, and builtins.zip in python 3. Which
are the same lazy function.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
framework/grouptools.py | 2 ++
framework/summary/common.py | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/framework/grouptools.py b/framework/grouptools.py
index a7f26bd..406c608 100644
--- a/framework/grouptools.py
+++ b/framework/grouptools.py
@@ -31,6 +31,8 @@ posix paths they may not start with a leading '/'.
from __future__ import absolute_import, division, print_function
+from six.moves import zip
+
__all__ = [
'SEPARATOR',
'commonprefix',
diff --git a/framework/summary/common.py b/framework/summary/common.py
index 671a540..c72fc3c 100644
--- a/framework/summary/common.py
+++ b/framework/summary/common.py
@@ -23,10 +23,11 @@
"""Shared functions for summary generation."""
from __future__ import absolute_import, division, print_function
-import itertools
import re
import operator
+from six.moves import zip
+
# a local variable status exists, prevent accidental overloading by renaming
# the module
import framework.status as so
@@ -308,7 +309,7 @@ def find_diffs(results, tests, comparator, handler=lambda *a: None):
"""
diffs = [] # There can't be changes from nil -> 0
- for prev, cur in itertools.izip(results[:-1], results[1:]):
+ for prev, cur in zip(results[:-1], results[1:]):
names = set()
for name in tests:
try:
--
2.7.0
More information about the Piglit
mailing list