[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 6.0-54-g12dc3a2
Sandro Tosi
morph at debian.org
Sat Oct 1 20:25:19 UTC 2011
The following commit has been merged in the master branch:
commit 12dc3a2aaac366151bf7544afff25306cd768e08
Author: Sandro Tosi <morph at debian.org>
Date: Tue Sep 20 18:34:04 2011 +0200
do a word match when parsing the suite name to get the available versions; thanks to Yann Dirson for the report; Closes: #642032
diff --git a/debian/changelog b/debian/changelog
index c52dfc2..788d677 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,11 @@ reportbug (6.2.2) UNRELEASED; urgency=low
* reportbug/utils.py
- support claws-mail MUA; thanks to David Paleino for the report and patch;
Closes: #532082
+ * reportbug/checkversions.py
+ - do a word match when parsing the suite name to get the available versions;
+ thanks to Yann Dirson for the report; Closes: #642032
- -- Sandro Tosi <morph at debian.org> Wed, 14 Sep 2011 22:47:19 +0200
+ -- Sandro Tosi <morph at debian.org> Tue, 20 Sep 2011 18:32:20 +0200
reportbug (6.2.1) unstable; urgency=low
diff --git a/reportbug/checkversions.py b/reportbug/checkversions.py
index 606e33a..4eaaa7e 100644
--- a/reportbug/checkversions.py
+++ b/reportbug/checkversions.py
@@ -170,7 +170,7 @@ def get_versions_available(package, timeout, dists=None, http_proxy=None, arch='
versions = {}
for dist in dists:
for version in parser.versions.keys():
- if dist in version:
+ if re.search(r'\b%s\b' % dist, version):
versions[dist] = parser.versions[version]
del parser
del page
diff --git a/test/test_checkversions.py b/test/test_checkversions.py
index 9a45f80..883e44e 100644
--- a/test/test_checkversions.py
+++ b/test/test_checkversions.py
@@ -1,6 +1,7 @@
import unittest2
from reportbug import checkversions
+from nose.plugins.attrib import attr
class TestCheckversions(unittest2.TestCase):
@@ -29,3 +30,12 @@ class TestCheckversions(unittest2.TestCase):
self.assertEqual(checkversions.later_version('', '1.2.3'), '')
self.assertEqual(checkversions.later_version('1.2.4', '1.2.3'), '1.2.4')
+
+class TestVersionAvailable(unittest2.TestCase):
+
+ @attr('network') #marking the test as using network
+ def test_bts642032(self):
+ vers = checkversions.get_versions_available('reportbug', 60)
+ # check stable version is lower than unstable
+ chk = checkversions.compare_versions(vers['stable'], vers['unstable'])
+ self.assertEqual(chk, 1)
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list