summaryrefslogtreecommitdiff
path: root/framework/summary
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2016-01-12 16:01:02 -0800
committerDylan Baker <baker.dylan.c@gmail.com>2016-02-08 12:29:34 -0800
commit60d848ed60997352e3ce375974a8202784261488 (patch)
tree4be70964d9d80911c0e8595272de75f28d3629c3 /framework/summary
parenta0cb4ea9c28acf664e90a755ee4a48c9c21032ed (diff)
framework,unittests: use __future__ unicode_literals
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@intel.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'framework/summary')
-rw-r--r--framework/summary/__init__.py6
-rw-r--r--framework/summary/common.py6
-rw-r--r--framework/summary/console_.py6
-rw-r--r--framework/summary/feature.py6
-rw-r--r--framework/summary/html_.py6
5 files changed, 20 insertions, 10 deletions
diff --git a/framework/summary/__init__.py b/framework/summary/__init__.py
index 0f0f144f0..e24b26890 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 e5e670b89..364f3e04d 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 b3945d4d8..e17a1d8c1 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 2fb8f50e3..7298cff51 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 d36920456..d89ae97ae 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