[Piglit] [PATCH 22/44] framework, unittests: use __future__ unicode_literals
baker.dylan.c at gmail.com
baker.dylan.c at gmail.com
Wed Jan 27 16:06:30 PST 2016
From: Dylan Baker <baker.dylan.c at gmail.com>
Use unicode_literals from __future__. This makes undecorated strings
(those not using and b or u prefix) into unicode instead of bytes in
python 2. This means that bytes strings need to have a b prefix now.
This also fixes a couple of unittests that broke during the transition.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
framework/backends/__init__.py | 6 ++++--
framework/backends/abstract.py | 6 ++++--
framework/backends/compression.py | 6 ++++--
framework/backends/json.py | 6 ++++--
framework/backends/junit.py | 6 ++++--
framework/backends/register.py | 6 ++++--
framework/compat.py | 4 +++-
framework/core.py | 4 +++-
framework/dmesg.py | 12 +++++++-----
framework/grouptools.py | 6 ++++--
framework/log.py | 6 ++++--
framework/options.py | 6 ++++--
framework/profile.py | 4 +++-
framework/programs/parsers.py | 6 ++++--
framework/programs/run.py | 4 +++-
framework/programs/summary.py | 4 +++-
framework/results.py | 4 +++-
framework/status.py | 4 +++-
framework/summary/__init__.py | 6 ++++--
framework/summary/common.py | 6 ++++--
framework/summary/console_.py | 6 ++++--
framework/summary/feature.py | 6 ++++--
framework/summary/html_.py | 6 ++++--
framework/test/__init__.py | 6 ++++--
framework/test/base.py | 4 +++-
framework/test/deqp.py | 6 ++++--
framework/test/gleantest.py | 4 +++-
framework/test/glsl_parser_test.py | 4 +++-
framework/test/gtest.py | 5 ++++-
framework/test/oclconform.py | 5 ++++-
framework/test/opencv.py | 5 ++++-
framework/test/opengl.py | 6 ++++--
framework/test/piglit_test.py | 4 +++-
framework/test/shader_test.py | 13 ++++++++++---
registry/gl.py | 4 +++-
tests/all.py | 4 +++-
tests/cl.py | 4 +++-
tests/cpu.py | 3 +++
tests/cts.py | 4 +++-
tests/deqp_gles2.py | 4 ++++
tests/deqp_gles3.py | 4 ++++
tests/deqp_gles31.py | 4 ++++
tests/es3conform.py | 4 ++++
tests/glslparser.py | 4 ++++
tests/gpu.py | 4 ++++
tests/igt.py | 5 ++++-
tests/llvmpipe.py | 4 ++++
tests/oglconform.py | 3 +++
tests/quick.py | 4 ++++
tests/quick_cl.py | 4 ++++
tests/sanity.py | 4 ++++
tests/shader.py | 4 ++++
tests/util/gen_dispatch.py | 4 +++-
tests/xts-render.py | 3 +++
tests/xts.py | 4 +++-
unittests/backends_tests.py | 4 +++-
unittests/base_tests.py | 4 +++-
unittests/compressed_backend_tests.py | 4 +++-
unittests/core_tests.py | 4 +++-
unittests/deqp_tests.py | 4 +++-
unittests/dmesg_tests.py | 4 +++-
unittests/exceptions_tests.py | 4 +++-
unittests/gleantest_tests.py | 4 +++-
unittests/glsl_parser_test_tests.py | 4 +++-
unittests/grouptools_tests.py | 4 +++-
unittests/gtest_tests.py | 4 +++-
unittests/integration_tests.py | 4 +++-
unittests/json_backend_tests.py | 4 +++-
unittests/json_results_update_tests.py | 4 +++-
unittests/json_tests.py | 4 +++-
unittests/junit_backends_tests.py | 4 +++-
unittests/log_tests.py | 4 +++-
unittests/oglconform_tests.py | 4 +++-
unittests/opencv_tests.py | 4 +++-
unittests/opengl_tests.py | 4 +++-
unittests/options_tests.py | 4 +++-
unittests/piglit_test_tests.py | 4 +++-
unittests/profile_tests.py | 4 +++-
unittests/results_tests.py | 19 +++++++++----------
unittests/run_parser_tests.py | 4 +++-
unittests/shader_test_tests.py | 4 +++-
unittests/status_tests.py | 4 +++-
unittests/summary_common_tests.py | 4 +++-
unittests/summary_console_tests.py | 4 +++-
unittests/summary_html_tests.py | 4 +++-
unittests/test_lists.py | 4 +++-
unittests/utils.py | 4 +++-
87 files changed, 311 insertions(+), 106 deletions(-)
diff --git a/framework/backends/__init__.py b/framework/backends/__init__.py
index 48c7917..7821375 100644
--- a/framework/backends/__init__.py
+++ b/framework/backends/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, 2015 Intel Corporation
+# Copyright (c) 2014-2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -41,7 +41,9 @@ that a user actually wants.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import importlib
diff --git a/framework/backends/abstract.py b/framework/backends/abstract.py
index c0c8903..b5b4858 100644
--- a/framework/backends/abstract.py
+++ b/framework/backends/abstract.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2014 Intel Corporation
+# Copyright (c) 2014, 2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -25,7 +25,9 @@ This module provides mixins and base classes for backend modules.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import abc
import contextlib
import itertools
diff --git a/framework/backends/compression.py b/framework/backends/compression.py
index 420c068..a1b9ade 100644
--- a/framework/backends/compression.py
+++ b/framework/backends/compression.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2015 Intel Corporation
+# Copyright (c) 2015-2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -37,7 +37,9 @@ the best way to get a compressor.
"""
-from __future__ import print_function, absolute_import, division
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import bz2
import errno
import functools
diff --git a/framework/backends/json.py b/framework/backends/json.py
index 88702e8..beae8f8 100644
--- a/framework/backends/json.py
+++ b/framework/backends/json.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2014 Intel Corporation
+# Copyright (c) 2014,2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,9 @@
""" Module providing json backend for piglit """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import sys
import shutil
diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index cf48b40..062c061 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, 2015 Intel Corporation
+# Copyright (c) 2014-2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,9 @@
""" Module implementing a JUnitBackend for piglit """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os.path
import shutil
diff --git a/framework/backends/register.py b/framework/backends/register.py
index fc3e79b..8d30d3e 100644
--- a/framework/backends/register.py
+++ b/framework/backends/register.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2015 Intel Corporation
+# Copyright (c) 2015-2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,9 @@
"""An object for registering backends."""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import collections
Registry = collections.namedtuple(
diff --git a/framework/compat.py b/framework/compat.py
index 8369c0e..3c8e490 100644
--- a/framework/compat.py
+++ b/framework/compat.py
@@ -24,7 +24,9 @@ This function is pending upstreaming in six.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import six
diff --git a/framework/core.py b/framework/core.py
index fbe7377..5ef72cb 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -22,7 +22,9 @@
# Piglit core
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import errno
import os
import subprocess
diff --git a/framework/dmesg.py b/framework/dmesg.py
index c33dd11..7bf18d1 100644
--- a/framework/dmesg.py
+++ b/framework/dmesg.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013-2014 Intel Corporation
+# Copyright (c) 2013-2016 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -35,7 +35,9 @@ dmesg implementation for their OS.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import abc
import gzip
import re
@@ -145,7 +147,7 @@ class BaseDmesg(object):
result.subtests[key] = replace(value)
# Add the dmesg values to the result
- result.dmesg = "\n".join(self._new_messages)
+ result.dmesg = "\n".join(self._new_messages).decode('utf-8')
return result
@@ -172,9 +174,9 @@ class LinuxDmesg(BaseDmesg):
# First check to see if we can find the live kernel config.
try:
- with gzip.open("/proc/config.gz", 'r') as f:
+ with gzip.open(b"/proc/config.gz", 'r') as f:
for line in f:
- if line.startswith("CONFIG_PRINTK_TIME=y"):
+ if line.startswith(b"CONFIG_PRINTK_TIME=y"):
return
# If there is a malformed or missing file, just ignore it and try the
# regex match (which may not exist if dmesg ringbuffer was cleared).
diff --git a/framework/grouptools.py b/framework/grouptools.py
index 9d16c2c..c3761c7 100644
--- a/framework/grouptools.py
+++ b/framework/grouptools.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, 2015 Intel Corporation
+# Copyright (c) 2014-2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,9 @@ posix paths they may not start with a leading '/'.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import six
from six.moves import zip
diff --git a/framework/log.py b/framework/log.py
index 12ff7ca..cd6cdc5 100644
--- a/framework/log.py
+++ b/framework/log.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013 Intel Corporation
+# Copyright (c) 2013-2016 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -26,7 +26,9 @@ returning BaseLog derived instances to individual tests.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import sys
import abc
import itertools
diff --git a/framework/options.py b/framework/options.py
index 78a020f..cf49520 100644
--- a/framework/options.py
+++ b/framework/options.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2015 Intel Corporation
+# Copyright (c) 2015-2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -25,7 +25,9 @@ is that while you can mutate
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import collections
import os
import re
diff --git a/framework/profile.py b/framework/profile.py
index 4ab39c0..fc38c56 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -26,7 +26,9 @@ are represented by a TestProfile or a TestProfile derived object.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import multiprocessing
import multiprocessing.dummy
diff --git a/framework/programs/parsers.py b/framework/programs/parsers.py
index 572ac18..9e1d1e3 100644
--- a/framework/programs/parsers.py
+++ b/framework/programs/parsers.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2015 Intel Corporation
+# Copyright (c) 2015-2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +27,9 @@ argumetns early and acting on them, or by inheriting from a parent object.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import argparse
from framework import core
diff --git a/framework/programs/run.py b/framework/programs/run.py
index 3bad41a..49f7b11 100644
--- a/framework/programs/run.py
+++ b/framework/programs/run.py
@@ -19,7 +19,9 @@
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import argparse
import sys
import os
diff --git a/framework/programs/summary.py b/framework/programs/summary.py
index 4137cf3..949c628 100644
--- a/framework/programs/summary.py
+++ b/framework/programs/summary.py
@@ -19,7 +19,9 @@
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import argparse
import shutil
import os
diff --git a/framework/results.py b/framework/results.py
index b18dce5..3bc5363 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -21,7 +21,9 @@
""" Module for results generation """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import collections
import copy
import datetime
diff --git a/framework/status.py b/framework/status.py
index 665c972..4c8b421 100644
--- a/framework/status.py
+++ b/framework/status.py
@@ -56,7 +56,9 @@ The formula for determining fixes is:
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import six
diff --git a/framework/summary/__init__.py b/framework/summary/__init__.py
index 0f0f144..e24b268 100644
--- a/framework/summary/__init__.py
+++ b/framework/summary/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2015 Intel Corporation
+# Copyright (c) 2015-2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -24,6 +24,8 @@
# generator functions up, allow for better testing coverage. Then we import the
# public parts here, so that we have a nice interface to work with.
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
from .html_ import html, feat
from .console_ import console
diff --git a/framework/summary/common.py b/framework/summary/common.py
index e5e670b..364f3e0 100644
--- a/framework/summary/common.py
+++ b/framework/summary/common.py
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Intel Corporation
+# Copyright 2013-2016 Intel Corporation
# Copyright 2013, 2014 Advanced Micro Devices
# Copyright 2014 VMWare
@@ -22,7 +22,9 @@
"""Shared functions for summary generation."""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import re
import operator
diff --git a/framework/summary/console_.py b/framework/summary/console_.py
index b3945d4..e17a1d8 100644
--- a/framework/summary/console_.py
+++ b/framework/summary/console_.py
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Intel Corporation
+# Copyright 2013-2016 Intel Corporation
# Copyright 2013, 2014 Advanced Micro Devices
# Copyright 2014 VMWare
@@ -22,7 +22,9 @@
"""Generate text summaries to be printed to the console."""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import textwrap
import six
diff --git a/framework/summary/feature.py b/framework/summary/feature.py
index 2fb8f50..7298cff 100644
--- a/framework/summary/feature.py
+++ b/framework/summary/feature.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2015 Intel Corporation
+# Copyright (c) 2015-2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
@@ -21,7 +21,9 @@
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
-from __future__ import print_function, division, absolute_import
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import copy
diff --git a/framework/summary/html_.py b/framework/summary/html_.py
index d369204..d89ae97 100644
--- a/framework/summary/html_.py
+++ b/framework/summary/html_.py
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Intel Corporation
+# Copyright 2013-2016 Intel Corporation
# Copyright 2013, 2014 Advanced Micro Devices
# Copyright 2014 VMWare
@@ -22,7 +22,9 @@
"""Genrate html summaries."""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import shutil
import tempfile
diff --git a/framework/test/__init__.py b/framework/test/__init__.py
index 1d18364..edb4d3e 100644
--- a/framework/test/__init__.py
+++ b/framework/test/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2014 Intel Corporation
+# Copyright (c) 2014,2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -24,7 +24,9 @@
# create a general use API, but allow it to be controlled by setting the
# __all__ in each module
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
from .base import *
from .piglit_test import *
from .gleantest import *
diff --git a/framework/test/base.py b/framework/test/base.py
index f65a839..159ab50 100644
--- a/framework/test/base.py
+++ b/framework/test/base.py
@@ -22,7 +22,9 @@
""" Module provides a base class for Tests """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import errno
import os
import time
diff --git a/framework/test/deqp.py b/framework/test/deqp.py
index bfe228e..0c4b8a0 100644
--- a/framework/test/deqp.py
+++ b/framework/test/deqp.py
@@ -1,4 +1,4 @@
-# Copyright 2014, 2015 Intel Corporation
+# Copyright 2014-2016 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -18,7 +18,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import abc
import os
import subprocess
diff --git a/framework/test/gleantest.py b/framework/test/gleantest.py
index a12b2ad..3d0c2ef 100644
--- a/framework/test/gleantest.py
+++ b/framework/test/gleantest.py
@@ -22,7 +22,9 @@
""" Glean support """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
from framework import options
diff --git a/framework/test/glsl_parser_test.py b/framework/test/glsl_parser_test.py
index da223fb..73224c6 100644
--- a/framework/test/glsl_parser_test.py
+++ b/framework/test/glsl_parser_test.py
@@ -21,7 +21,9 @@
""" This module enables the running of GLSL parser tests. """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import re
diff --git a/framework/test/gtest.py b/framework/test/gtest.py
index 547f92a..b331a2f 100644
--- a/framework/test/gtest.py
+++ b/framework/test/gtest.py
@@ -1,3 +1,4 @@
+# Copyright 2016 Intel Corporation
# Copyright 2013, 2014 Advanced Micro Devices, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
@@ -22,7 +23,9 @@
# Authors: Tom Stellard <thomas.stellard at amd.com>
#
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import re
from .base import Test
diff --git a/framework/test/oclconform.py b/framework/test/oclconform.py
index 8a652f7..48e4b72 100644
--- a/framework/test/oclconform.py
+++ b/framework/test/oclconform.py
@@ -1,3 +1,4 @@
+# Copyright 2016 Intel Corporation
# Copyright 2014 Advanced Micro Devices, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
@@ -22,7 +23,9 @@
# Authors: Tom Stellard <thomas.stellard at amd.com>
#
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import re
import subprocess
from os.path import join
diff --git a/framework/test/opencv.py b/framework/test/opencv.py
index bb8621b..3b9a12e 100644
--- a/framework/test/opencv.py
+++ b/framework/test/opencv.py
@@ -1,3 +1,4 @@
+# Copyright 2016 Intel Corporation
# Copyright 2014 Advanced Micro Devices, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
@@ -22,7 +23,9 @@
# Authors: Tom Stellard <thomas.stellard at amd.com>
#
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import re
import subprocess
from os import path
diff --git a/framework/test/opengl.py b/framework/test/opengl.py
index af0cc56..755e3e3 100644
--- a/framework/test/opengl.py
+++ b/framework/test/opengl.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2015 Intel Corporation
+# Copyright (c) 2015-2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,9 @@
"""Mixins for OpenGL derived tests."""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import errno
import os
import subprocess
diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py
index 998a4ee..32a991b 100644
--- a/framework/test/piglit_test.py
+++ b/framework/test/piglit_test.py
@@ -22,7 +22,9 @@
""" Module provides a base class for Tests """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import sys
import glob
diff --git a/framework/test/shader_test.py b/framework/test/shader_test.py
index c96b4a7..f5c26ba 100644
--- a/framework/test/shader_test.py
+++ b/framework/test/shader_test.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012, 2014, 2015 Intel Corporation
+# Copyright (C) 2012, 2014-2016 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
@@ -23,9 +23,13 @@
""" This module enables running shader tests. """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import re
+import six
+
from framework import exceptions
from .opengl import FastSkipMixin
from .piglit_test import PiglitBaseTest
@@ -57,7 +61,10 @@ class ShaderTest(FastSkipMixin, PiglitBaseTest):
# an exception. The second looks for the GL version or raises an
# exception
with open(filename, 'r') as shader_file:
- lines = (l for l in shader_file.readlines())
+ if six.PY3:
+ lines = (l for l in shader_file.readlines())
+ elif six.PY2:
+ lines = (l.decode('utf-8') for l in shader_file.readlines())
# Find the config section
for line in lines:
diff --git a/registry/gl.py b/registry/gl.py
index 98b1ee3..51b54df 100644
--- a/registry/gl.py
+++ b/registry/gl.py
@@ -23,7 +23,9 @@
Parse gl.xml into Python objects.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os.path
import re
diff --git a/tests/all.py b/tests/all.py
index c49dede..ec1a1c6 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1,7 +1,9 @@
# -*- coding: utf-8 -*-
# All tests that come with piglit, using default settings
-from __future__ import print_function, division, absolute_import
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import itertools
import os
import platform
diff --git a/tests/cl.py b/tests/cl.py
index 7740dfd..6679930 100644
--- a/tests/cl.py
+++ b/tests/cl.py
@@ -7,7 +7,9 @@
# invalid constant names, they're not really fixable, so just hide them.
# pylint: disable=invalid-name
-from __future__ import division, absolute_import, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
diff --git a/tests/cpu.py b/tests/cpu.py
index d3f9f88..34fb6f8 100644
--- a/tests/cpu.py
+++ b/tests/cpu.py
@@ -10,6 +10,9 @@ hardware.
"""
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
from tests.quick import profile
from framework.test import GLSLParserTest
diff --git a/tests/cts.py b/tests/cts.py
index 9250e0a..550eb29 100644
--- a/tests/cts.py
+++ b/tests/cts.py
@@ -42,7 +42,9 @@ PIGLIT_CTS_EXTRA_ARGS -- environment equivalent of [cts]:extra_args
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import itertools
from framework.test import deqp
diff --git a/tests/deqp_gles2.py b/tests/deqp_gles2.py
index c4bacb2..c951a19 100644
--- a/tests/deqp_gles2.py
+++ b/tests/deqp_gles2.py
@@ -20,6 +20,10 @@
"""Piglit integrations for dEQP GLES2 tests."""
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
from framework.test import deqp
__all__ = ['profile']
diff --git a/tests/deqp_gles3.py b/tests/deqp_gles3.py
index d353899..00b06ad 100644
--- a/tests/deqp_gles3.py
+++ b/tests/deqp_gles3.py
@@ -20,6 +20,10 @@
"""Piglit integrations for dEQP GLES3 tests."""
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
import xml.etree.cElementTree as ET
from framework.test import deqp
diff --git a/tests/deqp_gles31.py b/tests/deqp_gles31.py
index 8b48f5a..e5a22e0 100644
--- a/tests/deqp_gles31.py
+++ b/tests/deqp_gles31.py
@@ -20,6 +20,10 @@
"""Piglit integrations for dEQP GLES31 tests."""
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
from framework.test import deqp
__all__ = ['profile']
diff --git a/tests/es3conform.py b/tests/es3conform.py
index 53c2fc4..6bdcf2b 100644
--- a/tests/es3conform.py
+++ b/tests/es3conform.py
@@ -20,6 +20,10 @@
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
import re
from os import path
diff --git a/tests/glslparser.py b/tests/glslparser.py
index b5338f8..60442a2 100644
--- a/tests/glslparser.py
+++ b/tests/glslparser.py
@@ -1,5 +1,9 @@
"""A profile that runs only GLSLParserTest instances."""
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
from framework.test import GLSLParserTest
from tests.all import profile
diff --git a/tests/gpu.py b/tests/gpu.py
index 8844bb6..01bca25 100644
--- a/tests/gpu.py
+++ b/tests/gpu.py
@@ -2,6 +2,10 @@
# quick.tests minus compiler tests.
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
from tests.quick import profile
from framework.test import GLSLParserTest
diff --git a/tests/igt.py b/tests/igt.py
index 074df08..7ebb036 100644
--- a/tests/igt.py
+++ b/tests/igt.py
@@ -32,7 +32,10 @@ drm. Even if you have rendernode support enabled.
"""
-from __future__ import print_function, division, absolute_import
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
import os
import re
import subprocess
diff --git a/tests/llvmpipe.py b/tests/llvmpipe.py
index beb4511..6dd7a90 100644
--- a/tests/llvmpipe.py
+++ b/tests/llvmpipe.py
@@ -1,5 +1,9 @@
# -*- coding: utf-8 -*-
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
import platform
import sys
diff --git a/tests/oglconform.py b/tests/oglconform.py
index cdf42af..5104f44 100644
--- a/tests/oglconform.py
+++ b/tests/oglconform.py
@@ -21,6 +21,9 @@
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import re
import subprocess
diff --git a/tests/quick.py b/tests/quick.py
index e97d858..0e02f92 100644
--- a/tests/quick.py
+++ b/tests/quick.py
@@ -1,5 +1,9 @@
# -*- coding: utf-8 -*-
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
from framework import grouptools
from framework.test import (GleanTest, PiglitGLTest)
from tests.all import profile
diff --git a/tests/quick_cl.py b/tests/quick_cl.py
index 7f82a86..9f7c8f3 100644
--- a/tests/quick_cl.py
+++ b/tests/quick_cl.py
@@ -24,6 +24,10 @@
# Authors: Tom Stellard <thomas.stellard at amd.com>
#
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
from tests.cl import profile
from framework.test import add_opencv_tests, add_oclconform_tests
diff --git a/tests/sanity.py b/tests/sanity.py
index 93a884d..8c2151e 100644
--- a/tests/sanity.py
+++ b/tests/sanity.py
@@ -2,6 +2,10 @@
# Minimal tests to check whether the installation is working
#
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
from framework import grouptools
from framework.profile import TestProfile
from framework.test import PiglitGLTest
diff --git a/tests/shader.py b/tests/shader.py
index 4be504b..452f36a 100644
--- a/tests/shader.py
+++ b/tests/shader.py
@@ -1,5 +1,9 @@
"""A profile that runs only ShaderTest instances."""
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
+
from framework.test import ShaderTest
from tests.all import profile
diff --git a/tests/util/gen_dispatch.py b/tests/util/gen_dispatch.py
index a4dbf24..8031e9a 100644
--- a/tests/util/gen_dispatch.py
+++ b/tests/util/gen_dispatch.py
@@ -24,7 +24,9 @@
Generate C source code from Khronos XML.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import argparse
import os.path
diff --git a/tests/xts-render.py b/tests/xts-render.py
index fb4e943..ee644be 100644
--- a/tests/xts-render.py
+++ b/tests/xts-render.py
@@ -19,6 +19,9 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
from framework import core
from framework.profile import load_test_profile
diff --git a/tests/xts.py b/tests/xts.py
index 6798e70..6062c39 100644
--- a/tests/xts.py
+++ b/tests/xts.py
@@ -23,7 +23,9 @@
""" Test integreation for the X Test Suite """
-from __future__ import print_function, division, absolute_import
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import re
import subprocess
diff --git a/unittests/backends_tests.py b/unittests/backends_tests.py
index a7af795..c3cda86 100644
--- a/unittests/backends_tests.py
+++ b/unittests/backends_tests.py
@@ -22,7 +22,9 @@
""" Tests for the backend package """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import nose.tools as nt
diff --git a/unittests/base_tests.py b/unittests/base_tests.py
index 2fa13ca..2e64662 100644
--- a/unittests/base_tests.py
+++ b/unittests/base_tests.py
@@ -20,7 +20,9 @@
""" Tests for the exectest module """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import tempfile
import textwrap
import os
diff --git a/unittests/compressed_backend_tests.py b/unittests/compressed_backend_tests.py
index 3e1582e..19eea24 100644
--- a/unittests/compressed_backend_tests.py
+++ b/unittests/compressed_backend_tests.py
@@ -25,7 +25,9 @@ aiming to verify that compression and decompression works as expected.
"""
-from __future__ import print_function, absolute_import, division
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import functools
diff --git a/unittests/core_tests.py b/unittests/core_tests.py
index 7f6e520..9109be2 100644
--- a/unittests/core_tests.py
+++ b/unittests/core_tests.py
@@ -20,7 +20,9 @@
""" Module providing tests for the core module """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import collections
import functools
import os
diff --git a/unittests/deqp_tests.py b/unittests/deqp_tests.py
index ea0a016..7143da2 100644
--- a/unittests/deqp_tests.py
+++ b/unittests/deqp_tests.py
@@ -25,7 +25,9 @@ tests
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
try:
from unittest import mock
diff --git a/unittests/dmesg_tests.py b/unittests/dmesg_tests.py
index e6ea4cc..9cef57f 100644
--- a/unittests/dmesg_tests.py
+++ b/unittests/dmesg_tests.py
@@ -25,7 +25,9 @@ which allows us to test all classes on all platforms, including windows.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import re
import warnings
diff --git a/unittests/exceptions_tests.py b/unittests/exceptions_tests.py
index e93d7f7..72d39b8 100644
--- a/unittests/exceptions_tests.py
+++ b/unittests/exceptions_tests.py
@@ -20,7 +20,9 @@
"""Tests for the exceptions module."""
-from __future__ import print_function, absolute_import, division
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import nose.tools as nt
diff --git a/unittests/gleantest_tests.py b/unittests/gleantest_tests.py
index b597d69..e0e3902 100644
--- a/unittests/gleantest_tests.py
+++ b/unittests/gleantest_tests.py
@@ -20,7 +20,9 @@
""" Tests for the glean class. Requires Nose """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
try:
from unittest import mock
diff --git a/unittests/glsl_parser_test_tests.py b/unittests/glsl_parser_test_tests.py
index 818090e..de00d11 100644
--- a/unittests/glsl_parser_test_tests.py
+++ b/unittests/glsl_parser_test_tests.py
@@ -20,7 +20,9 @@
""" Provides tests for the shader_test module """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import textwrap
diff --git a/unittests/grouptools_tests.py b/unittests/grouptools_tests.py
index 30d0404..3a3b2d0 100644
--- a/unittests/grouptools_tests.py
+++ b/unittests/grouptools_tests.py
@@ -20,7 +20,9 @@
"""Module with tests for grouptools."""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import nose.tools as nt
diff --git a/unittests/gtest_tests.py b/unittests/gtest_tests.py
index 43977aa..568d649 100644
--- a/unittests/gtest_tests.py
+++ b/unittests/gtest_tests.py
@@ -20,7 +20,9 @@
""" Module providing tests for gtest """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import nose.tools as nt
diff --git a/unittests/integration_tests.py b/unittests/integration_tests.py
index 596fc54..1b0cb19 100644
--- a/unittests/integration_tests.py
+++ b/unittests/integration_tests.py
@@ -26,7 +26,9 @@ errors and to ensure that the API hasn't changed without fixing these modules
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import importlib
from nose.plugins.skip import SkipTest
diff --git a/unittests/json_backend_tests.py b/unittests/json_backend_tests.py
index 30a45f7..eb76bfb 100644
--- a/unittests/json_backend_tests.py
+++ b/unittests/json_backend_tests.py
@@ -22,7 +22,9 @@
""" Tests for the backend package """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
try:
diff --git a/unittests/json_results_update_tests.py b/unittests/json_results_update_tests.py
index 85c2d06..0fcf1ec 100644
--- a/unittests/json_results_update_tests.py
+++ b/unittests/json_results_update_tests.py
@@ -20,7 +20,9 @@
"""Tests for JSON backend version updates."""
-from __future__ import print_function, absolute_import, division
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import copy
import tempfile
diff --git a/unittests/json_tests.py b/unittests/json_tests.py
index e1cd418..189d246 100644
--- a/unittests/json_tests.py
+++ b/unittests/json_tests.py
@@ -26,7 +26,9 @@ tests and they will change with each version of the json output.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import nose.tools as nt
diff --git a/unittests/junit_backends_tests.py b/unittests/junit_backends_tests.py
index fda76b2..50fb058 100644
--- a/unittests/junit_backends_tests.py
+++ b/unittests/junit_backends_tests.py
@@ -22,7 +22,9 @@
""" Tests for the backend package """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
try:
diff --git a/unittests/log_tests.py b/unittests/log_tests.py
index 5c7a8ba..63aae5e 100644
--- a/unittests/log_tests.py
+++ b/unittests/log_tests.py
@@ -20,7 +20,9 @@
""" Module provides tests for log.py module """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import sys
import collections
import threading
diff --git a/unittests/oglconform_tests.py b/unittests/oglconform_tests.py
index a2f2689..bcc6eae 100644
--- a/unittests/oglconform_tests.py
+++ b/unittests/oglconform_tests.py
@@ -20,7 +20,9 @@
"""Tests for the oglconform integration."""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
try:
from unittest import mock
diff --git a/unittests/opencv_tests.py b/unittests/opencv_tests.py
index 94167ff..b533f2b 100644
--- a/unittests/opencv_tests.py
+++ b/unittests/opencv_tests.py
@@ -20,7 +20,9 @@
""" Module for testing opencv """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
from . import utils
from framework.test import OpenCVTest
diff --git a/unittests/opengl_tests.py b/unittests/opengl_tests.py
index 4e6656d..a6b81c3 100644
--- a/unittests/opengl_tests.py
+++ b/unittests/opengl_tests.py
@@ -20,7 +20,9 @@
"""Test the opengl module."""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import subprocess
import textwrap
diff --git a/unittests/options_tests.py b/unittests/options_tests.py
index ffe8e37..3d47610 100644
--- a/unittests/options_tests.py
+++ b/unittests/options_tests.py
@@ -20,7 +20,9 @@
"""Tests for the options module."""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import re
try:
diff --git a/unittests/piglit_test_tests.py b/unittests/piglit_test_tests.py
index 6352a01..a882e8d 100644
--- a/unittests/piglit_test_tests.py
+++ b/unittests/piglit_test_tests.py
@@ -20,7 +20,9 @@
"""Tests for the piglit_test module"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
try:
from unittest import mock
diff --git a/unittests/profile_tests.py b/unittests/profile_tests.py
index ee48c1b..6abbae5 100644
--- a/unittests/profile_tests.py
+++ b/unittests/profile_tests.py
@@ -20,7 +20,9 @@
""" Provides test for the framework.profile modules """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import sys
import copy
diff --git a/unittests/results_tests.py b/unittests/results_tests.py
index dc004d5..2f5c440 100644
--- a/unittests/results_tests.py
+++ b/unittests/results_tests.py
@@ -20,7 +20,9 @@
""" Module providing tests for the core module """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import nose.tools as nt
import six
@@ -383,20 +385,17 @@ class TestStringDescriptor(object):
"""results.StringDescriptor.__get__: returns default when unset"""
nt.eq_(self.test.val, u'')
+ @nt.raises(TypeError)
def test_set_no_replace(self):
"""results.StringDescriptor.__set__: instance is not replaced
- This test might not make sense if you don't understand the difference
- between 'is' and '==' in python. '==' is an equavalency test, while
- 'is' returns true only if the instances are the same.
-
- What this test does is makes sure that self.test.val is not *replaced*
- by inst, and instead the value is passed into the __set__ method.
+ This works by setting the value to a valid value (either bytes or str)
+ and then trying to set it to an invalid value (int). If the assignment
+ succeeds then the instance has been replaced, if not, it hasn't.
"""
- inst = 'foo'
- self.test.val = inst
- nt.ok_(self.test.val is not inst)
+ self.test.val = 'foo'
+ self.test.val = 1
def test_set_unicode(self):
"""results.StringDescriptor.__set__: unicode is stored directly"""
diff --git a/unittests/run_parser_tests.py b/unittests/run_parser_tests.py
index bce8189..44a1235 100644
--- a/unittests/run_parser_tests.py
+++ b/unittests/run_parser_tests.py
@@ -20,7 +20,9 @@
""" Module of tests for the run commandline parser """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import sys
import os
import shutil
diff --git a/unittests/shader_test_tests.py b/unittests/shader_test_tests.py
index b176b6f..8d67511 100644
--- a/unittests/shader_test_tests.py
+++ b/unittests/shader_test_tests.py
@@ -20,7 +20,9 @@
""" Provides tests for the shader_test module """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
try:
diff --git a/unittests/status_tests.py b/unittests/status_tests.py
index f1ba96d..b76d5b5 100644
--- a/unittests/status_tests.py
+++ b/unittests/status_tests.py
@@ -25,7 +25,9 @@ etc
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import itertools
import nose.tools as nt
diff --git a/unittests/summary_common_tests.py b/unittests/summary_common_tests.py
index 041961f..cfc9beb 100644
--- a/unittests/summary_common_tests.py
+++ b/unittests/summary_common_tests.py
@@ -21,7 +21,9 @@
""" Module providing tests for the summary module """
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import datetime
import nose.tools as nt
diff --git a/unittests/summary_console_tests.py b/unittests/summary_console_tests.py
index 5b097f1..2bca7e4 100644
--- a/unittests/summary_console_tests.py
+++ b/unittests/summary_console_tests.py
@@ -27,7 +27,9 @@ generator.
# pylint: disable=protected-access,invalid-name
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import sys
import nose.tools as nt
diff --git a/unittests/summary_html_tests.py b/unittests/summary_html_tests.py
index 523ab39..60de10f 100644
--- a/unittests/summary_html_tests.py
+++ b/unittests/summary_html_tests.py
@@ -22,7 +22,9 @@
# pylint: disable=protected-access
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import nose.tools as nt
diff --git a/unittests/test_lists.py b/unittests/test_lists.py
index f56f979..cf5bdda 100644
--- a/unittests/test_lists.py
+++ b/unittests/test_lists.py
@@ -26,7 +26,9 @@ es3conform, etc)
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import importlib
import os.path as path
diff --git a/unittests/utils.py b/unittests/utils.py
index 4e78ba0..f3834ef 100644
--- a/unittests/utils.py
+++ b/unittests/utils.py
@@ -25,7 +25,9 @@ in a single place.
"""
-from __future__ import absolute_import, division, print_function
+from __future__ import (
+ absolute_import, division, print_function, unicode_literals
+)
import os
import sys
import copy
--
2.7.0
More information about the Piglit
mailing list