Commit 3ef3304f authored by Markus Lehtonen's avatar Markus Lehtonen Committed by Guido Günther

tests: add tests for UpstreamSource.guess_version()

Signed-off-by: 's avatarMarkus Lehtonen <markus.lehtonen@linux.intel.com>
parent f10d67f5
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment