aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-11-09 16:29:24 +0100
committerGuido Günther <agx@sigxcpu.org>2017-11-09 16:33:14 +0100
commit75273ee27d63cd69e4c9528d19f67b0f4e230fe5 (patch)
tree359e525ec7fe25539813e8f73cb54c74c4962238 /tests
parente5df7d0bb77c6f288c49b4c0b0df0ca0a9e9c5db (diff)
buildpackage: Expand --git-comp-type auto again in --git-overlay mode
Thanks: Maximiliano Curia for the detailed analysis Closes: #879781
Diffstat (limited to 'tests')
-rw-r--r--tests/05_test_detection.py20
-rw-r--r--tests/component/deb/test_buildpackage.py2
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/05_test_detection.py b/tests/05_test_detection.py
index 6f26d5cc..b72aa943 100644
--- a/tests/05_test_detection.py
+++ b/tests/05_test_detection.py
@@ -58,14 +58,14 @@ class TestDetection(unittest.TestCase):
def test_guess_comp_type_no_pristine_tar_no_orig(self):
repo = MockGitRepository(with_branch=False)
guessed = export_orig.guess_comp_type(
- repo, 'auto', self.source, str(self.tmpdir))
+ 'auto', self.source, repo, str(self.tmpdir))
self.assertEqual('gzip', guessed)
def test_guess_comp_type_no_pristine_tar_with_orig(self):
open(self.tmpdir.join('source_1.2.orig.tar.bz2'), "w").close()
repo = MockGitRepository(with_branch=False)
guessed = export_orig.guess_comp_type(
- repo, 'auto', self.source, str(self.tmpdir))
+ 'auto', self.source, repo, str(self.tmpdir))
self.assertEqual('bzip2', guessed)
def test_guess_comp_type_no_pristine_tar_with_multiple_origs(self):
@@ -75,16 +75,16 @@ class TestDetection(unittest.TestCase):
self.assertRaises(
GbpError,
export_orig.guess_comp_type,
- repo,
'auto',
self.source,
+ repo,
str(self.tmpdir))
def test_guess_comp_type_auto_bzip2(self):
subject = 'pristine-tar data for source_1.2-3.orig.tar.bz2'
repo = MockGitRepository(with_branch=True, subject=subject)
guessed = export_orig.guess_comp_type(
- repo, 'auto', self.source, str(self.tmpdir))
+ 'auto', self.source, repo, str(self.tmpdir))
self.assertEqual("bzip2", guessed)
def test_has_orig_single_false(self):
@@ -109,35 +109,35 @@ class TestDetection(unittest.TestCase):
def test_guess_comp_type_bzip2(self):
repo = MockGitRepository(with_branch=False)
guessed = export_orig.guess_comp_type(
- repo, 'bzip2', self.source, None)
+ 'bzip2', self.source, repo, None)
self.assertEqual("bzip2", guessed)
def test_guess_comp_type_gzip(self):
repo = MockGitRepository(with_branch=False)
guessed = export_orig.guess_comp_type(
- repo, 'gzip', self.source, None)
+ 'gzip', self.source, repo, None)
self.assertEqual("gzip", guessed)
def test_guess_comp_type_bz(self):
repo = MockGitRepository(with_branch=False)
guessed = export_orig.guess_comp_type(
- repo, 'xz', self.source, None)
+ 'xz', self.source, repo, None)
self.assertEqual("xz", guessed)
def test_guess_comp_type_lzma(self):
repo = MockGitRepository(with_branch=False)
guessed = export_orig.guess_comp_type(
- repo, 'lzma', self.source, None)
+ 'lzma', self.source, repo, None)
self.assertEqual("lzma", guessed)
def test_guess_comp_type_bz2(self):
repo = MockGitRepository(with_branch=False)
guessed = export_orig.guess_comp_type(
- repo, 'bz2', self.source, None)
+ 'bz2', self.source, repo, None)
self.assertEqual("bzip2", guessed)
def test_guess_comp_type_gz(self):
repo = MockGitRepository(with_branch=False)
guessed = export_orig.guess_comp_type(
- repo, 'gz', self.source, None)
+ 'gz', self.source, repo, None)
self.assertEqual("gzip", guessed)
diff --git a/tests/component/deb/test_buildpackage.py b/tests/component/deb/test_buildpackage.py
index 70e57d4a..9d3aab03 100644
--- a/tests/component/deb/test_buildpackage.py
+++ b/tests/component/deb/test_buildpackage.py
@@ -194,7 +194,7 @@ class TestBuildpackage(ComponentTestBase):
"""Test that building in overlay mode with export dir works"""
tarball_dir = os.path.dirname(DEFAULT_OVERLAY)
self._test_buildpackage(repo, ['--git-overlay',
- '--git-compression=gzip',
+ '--git-compression=auto',
'--git-tarball-dir=%s' % tarball_dir,
'--git-no-purge',
'--git-component=foo',