summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.py2
-rw-r--r--tests/08_test_patch.py2
-rw-r--r--tests/09_test_write_tree.py2
-rw-r--r--tests/10_test_get_upstream_tree.py2
-rw-r--r--tests/11_test_dch_main.py2
-rw-r--r--tests/__init__.py20
6 files changed, 25 insertions, 5 deletions
diff --git a/setup.py b/setup.py
index b9342c2..4042eb4 100644
--- a/setup.py
+++ b/setup.py
@@ -55,7 +55,7 @@ setup(name = "gbp",
'bin/gbp-clone',
'bin/gbp-create-remote-repo',
'bin/git-pbuilder'],
- packages = find_packages(),
+ packages = find_packages(exclude=['tests', 'tests.*']),
data_files = [("/etc/git-buildpackage/", ["gbp.conf"]),],
setup_requires=['nose>=0.11.1', 'coverage>=2.85'],
)
diff --git a/tests/08_test_patch.py b/tests/08_test_patch.py
index 7aa6048..9816074 100644
--- a/tests/08_test_patch.py
+++ b/tests/08_test_patch.py
@@ -9,7 +9,7 @@ from gbp.patch_series import Patch
class TestPatch(unittest.TestCase):
- data_dir = "tests/%s_data" % __module__
+ data_dir = os.path.splitext(__file__)[0] + '_data'
def test_filename(self):
"""Get patch information from the filename"""
diff --git a/tests/09_test_write_tree.py b/tests/09_test_write_tree.py
index dd81f70..4275cac 100644
--- a/tests/09_test_write_tree.py
+++ b/tests/09_test_write_tree.py
@@ -4,7 +4,7 @@
import os
-import testutils
+import tests.testutils as testutils
import gbp.log
import gbp.git
diff --git a/tests/10_test_get_upstream_tree.py b/tests/10_test_get_upstream_tree.py
index 8c60178..83611dd 100644
--- a/tests/10_test_get_upstream_tree.py
+++ b/tests/10_test_get_upstream_tree.py
@@ -2,7 +2,7 @@
"""Test L{buildpackage}'s get_upstream_tree method"""
-import testutils
+import tests.testutils as testutils
import gbp.errors
import gbp.scripts.buildpackage as buildpackage
diff --git a/tests/11_test_dch_main.py b/tests/11_test_dch_main.py
index 7c8fee2..f45857e 100644
--- a/tests/11_test_dch_main.py
+++ b/tests/11_test_dch_main.py
@@ -4,7 +4,7 @@
import unittest
-from testutils import DebianGitTestRepo
+from tests.testutils import DebianGitTestRepo
from gbp.scripts import dch
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..22e1fc5
--- /dev/null
+++ b/tests/__init__.py
@@ -0,0 +1,20 @@
+# vim: set fileencoding=utf-8 :
+#
+# (C) 2009, 2010,2011, 2012 Guido Guenther <agx@sigxcpu.org>
+# (C) 2012 Intel Corporation <markus.lehtonen@linux.intel.com>
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+"""Unit tests for git-buildpackage"""
+
+# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: