Add a test case to catch bug #731398.

This commit is contained in:
Benjamin Drung 2011-03-08 17:22:45 +01:00
parent 82187df277
commit 877592d0a4
2 changed files with 11 additions and 3 deletions

5
debian/changelog vendored
View File

@ -17,9 +17,10 @@ ubuntu-dev-tools (0.120) UNRELEASED; urgency=low
[ Benjamin Drung ] [ Benjamin Drung ]
* data/ubuntu.csv: Add Oneiric Ocelot to the list of know releases. * data/ubuntu.csv: Add Oneiric Ocelot to the list of know releases.
* ubuntutools.distro_info: Fix TypeError crash (LP: #731398). * ubuntutools.distro_info: Fix TypeError crash and add a test case to
catch regressions (LP: #731398).
-- Benjamin Drung <bdrung@debian.org> Tue, 08 Mar 2011 16:54:59 +0100 -- Benjamin Drung <bdrung@debian.org> Tue, 08 Mar 2011 17:19:55 +0100
ubuntu-dev-tools (0.119) unstable; urgency=low ubuntu-dev-tools (0.119) unstable; urgency=low

View File

@ -101,8 +101,15 @@ class UbuntuDistroInfoTestCase(unittest.TestCase):
self.assertEqual(self._distro_info.supported(self._date), supported) self.assertEqual(self._distro_info.supported(self._date), supported)
def test_unsupported(self): def test_unsupported(self):
"""Test: List all unsupported Ubuntu distribution.""" """Test: List all unsupported Ubuntu distributions."""
unsupported = set(["warty", "hoary", "breezy", "edgy", "feisty", unsupported = set(["warty", "hoary", "breezy", "edgy", "feisty",
"gutsy", "intrepid", "jaunty"]) "gutsy", "intrepid", "jaunty"])
self.assertEqual(unsupported - self.assertEqual(unsupported -
set(self._distro_info.unsupported(self._date)), set()) set(self._distro_info.unsupported(self._date)), set())
def test_current_unsupported(self):
"""Test: List all unsupported Ubuntu distributions today."""
unsupported = set(["warty", "hoary", "breezy", "edgy", "feisty",
"gutsy", "intrepid", "jaunty"])
self.assertEqual(unsupported -
set(self._distro_info.unsupported()), set())