aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/15_test_DebianSource.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-08-06 18:11:50 -0300
committerGuido Günther <agx@sigxcpu.org>2017-08-06 18:11:50 -0300
commitd5f5e86ff4de5dbc6d436610424cf3d8221e144b (patch)
tree4198184ed32aed8a19f70543c536a030ff24706b /tests/15_test_DebianSource.py
parentf09442516bf1d5cbabccea5a4cca7373af2cd7c1 (diff)
DebianSource: releasability check based on UNRELEASED
Diffstat (limited to 'tests/15_test_DebianSource.py')
-rw-r--r--tests/15_test_DebianSource.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/15_test_DebianSource.py b/tests/15_test_DebianSource.py
index a9f43d32..98d5f706 100644
--- a/tests/15_test_DebianSource.py
+++ b/tests/15_test_DebianSource.py
@@ -84,3 +84,31 @@ class TestDebianSource(testutils.DebianGitTestRepo):
self._commit_format('3.0', 'quilt')
source = DebianSource(GitVfs(self.repo))
self.assertFalse(source.is_native())
+
+ def test_is_releasable(self):
+ source = DebianSource('.')
+ os.makedirs('debian/')
+ with open('debian/changelog', 'w') as f:
+ f.write("""git-buildpackage (0.2.3) unstable; urgency=low
+
+ * git doesn't like '~' in tag names so replace this with a dot when tagging
+
+ -- Guido Guenther <agx@sigxcpu.org> Mon, 2 Oct 2006 18:30:20 +0200
+""")
+ source = DebianSource('.')
+ self.assertEquals(source.changelog.distribution, "unstable")
+ self.assertTrue(source.is_releasable())
+
+ def test_is_not_releasable(self):
+ source = DebianSource('.')
+ os.makedirs('debian/')
+ with open('debian/changelog', 'w') as f:
+ f.write("""git-buildpackage (0.2.3) UNRELEASED; urgency=low
+
+ * git doesn't like '~' in tag names so replace this with a dot when tagging
+
+ -- Guido Guenther <agx@sigxcpu.org> Mon, 2 Oct 2006 18:30:20 +0200
+""")
+ source = DebianSource('.')
+ self.assertEquals(source.changelog.distribution, "UNRELEASED")
+ self.assertFalse(source.is_releasable())