aboutsummaryrefslogtreecommitdiff
path: root/tests/component/deb/test_import_dsc.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-07-05 12:25:32 +0200
committerGuido Günther <agx@sigxcpu.org>2016-07-05 13:52:32 +0200
commit3a5a497c9e42b0167baa8847fc8a9f09cc111ceb (patch)
tree5d06130cc864000fa952e403ce81344197da0f0b /tests/component/deb/test_import_dsc.py
parentd7b62d1dcef81e2bb9264dfb3871736993d9ac78 (diff)
import_dsc: Use the same patch options as dpkg-source for 1.0 packages
(except for creating backup files) Closes: #670099
Diffstat (limited to 'tests/component/deb/test_import_dsc.py')
-rw-r--r--tests/component/deb/test_import_dsc.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/component/deb/test_import_dsc.py b/tests/component/deb/test_import_dsc.py
index d7a96ff..16a45b1 100644
--- a/tests/component/deb/test_import_dsc.py
+++ b/tests/component/deb/test_import_dsc.py
@@ -33,7 +33,7 @@ from gbp.deb.dscfile import DscFile
class TestImportDsc(ComponentTestBase):
"""Test importing of debian source packages"""
- def test_debian_import(self):
+ def test_import_debian_native(self):
"""Test that importing of debian native packages works"""
def _dsc(version):
return os.path.join(DEB_TEST_DATA_DIR,
@@ -147,3 +147,17 @@ class TestImportDsc(ComponentTestBase):
dsc]) == 1
self._check_log(0, "gbp:error: Directory 'hello-debhelper' already exists. If you want to import into it, "
"please change into this directory otherwise move it away first")
+
+ def test_import_10(self):
+ """Test if importing a 1.0 source format package works"""
+ def _dsc(version):
+ return os.path.join(DEB_TEST_DATA_DIR,
+ 'dsc-1.0',
+ 'hello-debhelper_%s.dsc' % version)
+
+ dsc = _dsc('2.6-2')
+ assert import_dsc(['arg0', dsc]) == 0
+ repo = ComponentTestGitRepository('hello-debhelper')
+ self._check_repo_state(repo, 'master', ['master', 'upstream'],
+ tags=['upstream/2.6', 'debian/2.6-2'])
+ assert len(repo.get_commits()) == 2