From 25c6f7f1e035c3038e6f0230c67cb2117302fdb9 Mon Sep 17 00:00:00 2001 From: Paul Morgan Date: Sat, 22 Feb 2014 19:43:43 +0000 Subject: [PATCH] avoid ImportError in test suite on python 3 python3 does not allow relative imports. test/unit/__init.py__ and test/functional/__init.py__ already exist, which means we can use absolute import on all versions of python without resorting to http://legacy.python.org/dev/peps/pep-0328/ --- test/functional/fetch_tests.py | 2 +- test/functional/multiproject_tests.py | 2 +- test/functional/release_yum_tests.py | 2 +- test/functional/singleproject_tests.py | 2 +- test/unit/pep8-tests.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/functional/fetch_tests.py b/test/functional/fetch_tests.py index 264d275..c6a7ab8 100644 --- a/test/functional/fetch_tests.py +++ b/test/functional/fetch_tests.py @@ -24,7 +24,7 @@ from os.path import join from tito.common import run_command from tito.compat import * -from fixture import TitoGitTestFixture, tito +from functional.fixture import TitoGitTestFixture, tito EXT_SRC_PKG = "extsrc" diff --git a/test/functional/multiproject_tests.py b/test/functional/multiproject_tests.py index 432475a..1c7cf16 100644 --- a/test/functional/multiproject_tests.py +++ b/test/functional/multiproject_tests.py @@ -22,7 +22,7 @@ from os.path import join from tito.common import run_command, \ get_latest_tagged_version, tag_exists_locally -from fixture import * +from functional.fixture import * # A location where we can safely create a test git repository. # WARNING: This location will be destroyed if present. diff --git a/test/functional/release_yum_tests.py b/test/functional/release_yum_tests.py index d2b4e89..320dc05 100644 --- a/test/functional/release_yum_tests.py +++ b/test/functional/release_yum_tests.py @@ -22,7 +22,7 @@ import tempfile from os.path import join -from fixture import TitoGitTestFixture, tito +from functional.fixture import TitoGitTestFixture, tito from tito.compat import * diff --git a/test/functional/singleproject_tests.py b/test/functional/singleproject_tests.py index 3c87710..ef2f0d0 100644 --- a/test/functional/singleproject_tests.py +++ b/test/functional/singleproject_tests.py @@ -14,7 +14,7 @@ import os from tito.common import * -from fixture import TitoGitTestFixture, tito +from functional.fixture import TitoGitTestFixture, tito #TITO_REPO = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) PKG_NAME = "titotestpkg" diff --git a/test/unit/pep8-tests.py b/test/unit/pep8-tests.py index 6697f7a..f3671a0 100644 --- a/test/unit/pep8-tests.py +++ b/test/unit/pep8-tests.py @@ -22,7 +22,7 @@ http://docs.python.org/3.3/reference/lexical_analysis.html """ import pep8 -from fixture import * +from unit.fixture import * class TestPep8(TitoUnitTestFixture):