summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-07-25 08:58:23 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-11-14 14:21:38 +0200
commitc1f093ef03600af772874421c362810a748b8bed (patch)
tree16bfed19b6b43b1089b35a551b5901eed0e71d81 /tests
parente5d6293a6ab52cb2e4e4a2c21e138e9d1c0eaeb0 (diff)
downloadgit-buildpackage-c1f093ef03600af772874421c362810a748b8bed.tar.gz
git-buildpackage-c1f093ef03600af772874421c362810a748b8bed.tar.bz2
git-buildpackage-c1f093ef03600af772874421c362810a748b8bed.zip
tests: add tests for UpstreamSource.guess_version()
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/06_test_upstream_source.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/06_test_upstream_source.py b/tests/06_test_upstream_source.py
index 967c4fa0..34787bf4 100644
--- a/tests/06_test_upstream_source.py
+++ b/tests/06_test_upstream_source.py
@@ -60,6 +60,7 @@ class TestTar(unittest.TestCase):
repacked = self.source.pack(target)
self.assertEqual(repacked.is_orig(), True)
self.assertEqual(repacked.is_dir(), False)
+ self.assertEqual(repacked.guess_version(), ('gbp', '0.1'))
self._check_tar(repacked, ["gbp/errors.py", "gbp/__init__.py"])
def test_pack_filtered(self):
@@ -90,6 +91,7 @@ class TestZip(unittest.TestCase):
self.assertEqual(source.is_orig(), False)
self.assertEqual(source.is_dir(), False)
self.assertEqual(source.unpacked, None)
+ self.assertEqual(source.guess_version(), ('gbp', '0.1'))
source.unpack(str(self.tmpdir))
self.assertNotEqual(source.unpacked, None)