diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2016-01-04 16:42:45 -0800 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2016-02-08 12:29:33 -0800 |
commit | f41158915be47daae8bcf4c7afd54bec577f9454 (patch) | |
tree | 18b6aa319c6fbbdd3ffcdbb68196054be70720e8 /unittests/log_tests.py | |
parent | 8c3bb871120f81b7c57b214ee2771184060a4d6b (diff) |
python: use future print, division, and absolute_import
These are the three python3 like behaviors that piglit should rely on.
The only other applicable future import is unicode_literals. Although my
plan is to use unicode_literals, that will actually cause behavioral
changes in some cases, where these cause minimal changes to the code.
Piglit will not be targeting < 3.2, they are old, unsupported, and have
fewer features than 2.7.
Piglit now has division (using / as floating division, and // as integer
division), print as a function (rather than a statement), and
absolute import, which changes the way import works when there's a
conflict between a local import and a system wide one. Absolute import
makes more sense, and copies the behavior of python 3
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'unittests/log_tests.py')
-rw-r--r-- | unittests/log_tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/log_tests.py b/unittests/log_tests.py index 1f1cf33e4..5c7a8ba90 100644 --- a/unittests/log_tests.py +++ b/unittests/log_tests.py @@ -20,7 +20,7 @@ """ Module provides tests for log.py module """ -from __future__ import print_function, absolute_import +from __future__ import absolute_import, division, print_function import sys import collections import threading |