From: Markus Lehtonen Date: Fri, 25 Jul 2014 05:58:23 +0000 (+0300) Subject: tests: add tests for UpstreamSource.guess_version() X-Git-Tag: tizen/0.6.22-20150206~205 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1f093ef03600af772874421c362810a748b8bed;p=tools%2Fgit-buildpackage.git tests: add tests for UpstreamSource.guess_version() Signed-off-by: Markus Lehtonen --- diff --git a/tests/06_test_upstream_source.py b/tests/06_test_upstream_source.py index 967c4fa..34787bf 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)