Use relative import for testutils
authorGuido Günther <agx@sigxcpu.org>
Thu, 19 Feb 2015 22:45:48 +0000 (23:45 +0100)
committerGuido Günther <agx@sigxcpu.org>
Fri, 20 Feb 2015 11:54:36 +0000 (12:54 +0100)
tests/03_test_dch_guess_version.py
tests/09_test_write_tree.py
tests/10_test_get_upstream_tree.py
tests/11_test_dch_main.py
tests/13_test_gbp_pq.py
tests/14_test_gbp_import_dscs.py
tests/15_test_DebianSource.py
tests/17_test_dch_guess_documented_commit.py
tests/18_test_Config.py
tests/test_Changelog.py

index 6109bfb372dd58e0309e6f0a32e12780b6aa8749..5dca3b71ad1b7b046b5befa60b1c52a5d1e1f932 100644 (file)
@@ -4,7 +4,7 @@
 
 from . import context
 
-import testutils
+from . import testutils
 
 from gbp.scripts import dch
 
index 314d76f71eab0acdc149f127f429bc563672a609..bad362c8575d50eb8def524bd5a813e0ba27dcc5 100644 (file)
@@ -5,11 +5,10 @@
 from __future__ import print_function
 
 from . import context
+from . import testutils
 
 import os
 
-import tests.testutils as testutils
-
 import gbp.log
 import gbp.git
 import gbp.errors
index f489f2bcdb0413461ddef812e80a4c0eac96f083..08a0f059c6883b46f28dbac556bff08c19f68b7e 100644 (file)
@@ -3,8 +3,7 @@
 """Test  L{buildpackage}'s get_upstream_tree method"""
 
 from . import context
-
-import tests.testutils as testutils
+from . import testutils
 
 import gbp.errors
 import gbp.scripts.buildpackage as buildpackage
index dbfc25cd6dab31e1c044f6b20930139b607904a0..ac747e64f7c6c10102080e115233f20f1a95634d 100644 (file)
@@ -3,14 +3,12 @@
 """Test L{gbp.scripts.dch} main"""
 
 from . import context
-
-import unittest
-
-from tests.testutils import (DebianGitTestRepo, OsReleaseFile,
-                             get_dch_default_urgency)
+from .testutils import (DebianGitTestRepo, OsReleaseFile,
+                        get_dch_default_urgency)
 
 from gbp.scripts import dch
 
+import unittest
 import os
 import re
 
index 46110b1c5689234ca41f65b264844fc00485fdfc..d9fa375eec5c1a3a91658e46d9581c7fab9e534c 100644 (file)
@@ -16,6 +16,7 @@
 """Test L{gbp.pq}"""
 
 from . import context
+from . import testutils
 
 import os
 import logging
@@ -24,7 +25,6 @@ import unittest
 from gbp.scripts.pq import generate_patches, export_patches
 import gbp.scripts.common.pq as pq
 import gbp.patch_series
-import tests.testutils as testutils
 
 class TestApplyAndCommit(testutils.DebianGitTestRepo):
     """Test L{gbp.pq}'s apply_and_commit"""
index ba3d5f797d21e6ff24a5263a8d62ee593ac6f308..b5569a85e8d77bd9fac2d74b9a59bb1765be4281 100644 (file)
@@ -16,8 +16,8 @@
 """Test L{gbp.pq}"""
 
 from . import context
+from . import testutils
 
-import testutils
 import gbp.log
 import gbp.scripts.import_dscs as import_dscs
 
index feca62562079ce42741865011c4e68b6b796d913..c1114e6c4a66ef817e7d0f60012451d01a219855 100644 (file)
 """Test L{gbp.pq}"""
 
 from . import context
+from . import testutils
 
 import os
-import testutils
+
 from gbp.deb.source import DebianSource, DebianSourceError
 from gbp.deb.format import DebianSourceFormat
 from gbp.git.vfs import GitVfs
index 89eba2d343b337967dec7e5263d3ecb6f456565c..cda816d8e02905b83430efebe54470bcd2688bf7 100644 (file)
@@ -3,8 +3,7 @@
 """Test L{Changelog}'s guess_version_from_upstream"""
 
 from . import context
-
-import testutils
+from . import testutils
 
 from gbp.scripts import dch
 
index 1560ece4f10aacfcbe3d292be6e61153de5597d0..3f60e4523bc2dd3a145699913e99e4ff60b4ca72 100644 (file)
@@ -4,7 +4,7 @@ import os
 import sys
 import unittest
 from gbp.config import GbpOptionParser, GbpOptionGroup
-from . testutils import GbpLogTester
+from .testutils import GbpLogTester
 
 class TestConfigParser(unittest.TestCase, GbpLogTester):
     def __init__(self, methodName='runTest'):
index 9b0a0e7f86f6e6e36fb3e3c0852e44af7af3e498..8f807ee2ca21729b9f95df52ac0b821452f6b84a 100644 (file)
@@ -229,7 +229,7 @@ def test_add_section():
     >>> import tempfile
     >>> import shutil
     >>> import gbp.deb.changelog
-    >>> from tests.testutils import OsReleaseFile
+    >>> from .testutils import OsReleaseFile
     >>> os_release = OsReleaseFile('/etc/lsb-release')
     >>> olddir = os.path.abspath(os.path.curdir)
     >>> testdir = tempfile.mkdtemp(prefix='gbp-test-changelog-')
@@ -275,7 +275,7 @@ def test_add_entry():
     >>> import tempfile
     >>> import shutil
     >>> import gbp.deb.changelog
-    >>> from tests.testutils import OsReleaseFile
+    >>> from .testutils import OsReleaseFile
     >>> os_release = OsReleaseFile('/etc/lsb-release')
     >>> olddir = os.path.abspath(os.path.curdir)
     >>> testdir = tempfile.mkdtemp(prefix='gbp-test-changelog-')