diff options
-rw-r--r-- | lnt/external/stats/pstat.py | 2 | ||||
-rw-r--r-- | lnt/external/stats/stats.py | 3 | ||||
-rw-r--r-- | lnt/formats/__init__.py | 5 | ||||
-rw-r--r-- | lnt/lnttool/__init__.py | 3 | ||||
-rw-r--r-- | lnt/server/db/testsuite.py | 6 | ||||
-rw-r--r-- | lnt/server/db/testsuitedb.py | 3 | ||||
-rw-r--r-- | lnt/testing/profile/__init__.py | 7 | ||||
-rw-r--r-- | lnt/testing/profile/perf.py | 5 | ||||
-rw-r--r-- | lnt/testing/profile/profilev2impl.py | 3 |
9 files changed, 23 insertions, 14 deletions
diff --git a/lnt/external/stats/pstat.py b/lnt/external/stats/pstat.py index aa8c616..748dbef 100644 --- a/lnt/external/stats/pstat.py +++ b/lnt/external/stats/pstat.py @@ -105,8 +105,8 @@ functions/methods. Their inclusion here is for function name consistency. ## ## 11/08/98 ... fixed aput to output large arrays correctly +from __future__ import absolute_import from __future__ import print_function -import stats # required 3rd party module import string, copy from types import * diff --git a/lnt/external/stats/stats.py b/lnt/external/stats/stats.py index c792d13..4fb5d36 100644 --- a/lnt/external/stats/stats.py +++ b/lnt/external/stats/stats.py @@ -222,8 +222,9 @@ SUPPORT FUNCTIONS: writecc ## changed name of skewness and askewness to skew and askew ## fixed (a)histogram (which sometimes counted points <lowerlimit) +from __future__ import absolute_import from __future__ import print_function -import pstat # required 3rd party module +from . import pstat # required 3rd party module import math, string, copy # required python modules from types import * diff --git a/lnt/formats/__init__.py b/lnt/formats/__init__.py index 9079450..c03ffb8 100644 --- a/lnt/formats/__init__.py +++ b/lnt/formats/__init__.py @@ -7,8 +7,9 @@ callable taking a path_or_file object, the 'write' function should be a callable taking a Python object to write, and the path_or_file to write to. """ -from PlistFormat import format as plist -from JSONFormat import format as json +from __future__ import absolute_import +from .PlistFormat import format as plist +from .JSONFormat import format as json formats = [plist, json] formats_by_name = dict((f['name'], f) for f in formats) diff --git a/lnt/lnttool/__init__.py b/lnt/lnttool/__init__.py index 7760218..28a041b 100644 --- a/lnt/lnttool/__init__.py +++ b/lnt/lnttool/__init__.py @@ -1 +1,2 @@ -from main import main +from __future__ import absolute_import +from .main import main diff --git a/lnt/server/db/testsuite.py b/lnt/server/db/testsuite.py index 9e89600..d8e2f40 100644 --- a/lnt/server/db/testsuite.py +++ b/lnt/server/db/testsuite.py @@ -2,10 +2,10 @@ Database models for the TestSuites abstraction. """ +from __future__ import absolute_import import json import lnt -import testsuitedb -import util +from . import util import sqlalchemy import sqlalchemy.ext.declarative @@ -114,6 +114,7 @@ class TestSuite(Base): @staticmethod def from_json(data): + from . import testsuitedb if data.get('format_version') != '2': raise ValueError("Expected \"format_version\": \"2\" in schema") name = data['name'] @@ -349,6 +350,7 @@ class SampleField(FieldMixin, Base): def _upgrade_to(connectable, tsschema, new_schema, dry_run=False): + from . import testsuitedb new = json.loads(new_schema.jsonschema) old = json.loads(tsschema.jsonschema) ts_name = new['name'] diff --git a/lnt/server/db/testsuitedb.py b/lnt/server/db/testsuitedb.py index fdf72c0..303a46d 100644 --- a/lnt/server/db/testsuitedb.py +++ b/lnt/server/db/testsuitedb.py @@ -5,6 +5,7 @@ These are a bit magical because the models themselves are driven by the test suite metadata, so we only create the classes at runtime. """ +from __future__ import absolute_import import datetime import json import os @@ -18,7 +19,7 @@ from sqlalchemy.orm.exc import ObjectDeletedError from typing import List from lnt.util import logger -import testsuite +from . import testsuite import lnt.testing.profile.profile as profile import lnt from lnt.server.ui.util import convert_revision diff --git a/lnt/testing/profile/__init__.py b/lnt/testing/profile/__init__.py index 841e71e..c570776 100644 --- a/lnt/testing/profile/__init__.py +++ b/lnt/testing/profile/__init__.py @@ -1,7 +1,8 @@ # This is the profile implementation registry. Register new profile # implementations here. -from profilev1impl import ProfileV1 -from profilev2impl import ProfileV2 -from perf import LinuxPerfProfile +from __future__ import absolute_import +from .profilev1impl import ProfileV1 +from .profilev2impl import ProfileV2 +from .perf import LinuxPerfProfile IMPLEMENTATIONS = {0: LinuxPerfProfile, 1: ProfileV1, 2: ProfileV2} diff --git a/lnt/testing/profile/perf.py b/lnt/testing/profile/perf.py index 4c2174e..35901ec 100644 --- a/lnt/testing/profile/perf.py +++ b/lnt/testing/profile/perf.py @@ -1,6 +1,7 @@ +from __future__ import absolute_import from lnt.util import logger -from profile import ProfileImpl -from profilev1impl import ProfileV1 +from .profile import ProfileImpl +from .profilev1impl import ProfileV1 import os import traceback diff --git a/lnt/testing/profile/profilev2impl.py b/lnt/testing/profile/profilev2impl.py index ccb75e9..c0114ba 100644 --- a/lnt/testing/profile/profilev2impl.py +++ b/lnt/testing/profile/profilev2impl.py @@ -1,4 +1,5 @@ -from profile import ProfileImpl +from __future__ import absolute_import +from .profile import ProfileImpl import StringIO import bz2 import copy |