From 877592d0a4b8a438a3d6fbdb39b7db9e897684a8 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Tue, 8 Mar 2011 17:22:45 +0100 Subject: [PATCH] Add a test case to catch bug #731398. --- debian/changelog | 5 +++-- ubuntutools/test/test_distro_info.py | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 585e2b5..0b8ea68 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,9 +17,10 @@ ubuntu-dev-tools (0.120) UNRELEASED; urgency=low [ Benjamin Drung ] * 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 Tue, 08 Mar 2011 16:54:59 +0100 + -- Benjamin Drung Tue, 08 Mar 2011 17:19:55 +0100 ubuntu-dev-tools (0.119) unstable; urgency=low diff --git a/ubuntutools/test/test_distro_info.py b/ubuntutools/test/test_distro_info.py index cb50d2b..d52bf85 100644 --- a/ubuntutools/test/test_distro_info.py +++ b/ubuntutools/test/test_distro_info.py @@ -101,8 +101,15 @@ class UbuntuDistroInfoTestCase(unittest.TestCase): self.assertEqual(self._distro_info.supported(self._date), supported) def test_unsupported(self): - """Test: List all unsupported Ubuntu distribution.""" + """Test: List all unsupported Ubuntu distributions.""" unsupported = set(["warty", "hoary", "breezy", "edgy", "feisty", "gutsy", "intrepid", "jaunty"]) self.assertEqual(unsupported - 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())