Codebase list distro-info / d9a880d
python: Define sets directly Signed-off-by: Benjamin Drung <bdrung@debian.org> Benjamin Drung 3 years ago
1 changed file(s) with 32 addition(s) and 38 deletion(s). Raw diff Collapse all Expand all
3030
3131 def test_all(self):
3232 """Test: List all known Debian distributions."""
33 all_distros = set(
34 [
35 "buzz",
36 "rex",
37 "bo",
38 "hamm",
39 "slink",
40 "potato",
41 "woody",
42 "sarge",
43 "etch",
44 "lenny",
45 "squeeze",
46 "sid",
47 "experimental",
48 ]
49 )
33 all_distros = {
34 "buzz",
35 "rex",
36 "bo",
37 "hamm",
38 "slink",
39 "potato",
40 "woody",
41 "sarge",
42 "etch",
43 "lenny",
44 "squeeze",
45 "sid",
46 "experimental",
47 }
5048 self.assertEqual(all_distros - set(self._distro_info.all), set())
5149
5250 def test_devel(self):
122120
123121 def test_all(self):
124122 """Test: List all known Ubuntu distributions."""
125 all_distros = set(
126 [
127 "warty",
128 "hoary",
129 "breezy",
130 "dapper",
131 "edgy",
132 "feisty",
133 "gutsy",
134 "hardy",
135 "intrepid",
136 "jaunty",
137 "karmic",
138 "lucid",
139 "maverick",
140 "natty",
141 ]
142 )
123 all_distros = {
124 "warty",
125 "hoary",
126 "breezy",
127 "dapper",
128 "edgy",
129 "feisty",
130 "gutsy",
131 "hardy",
132 "intrepid",
133 "jaunty",
134 "karmic",
135 "lucid",
136 "maverick",
137 "natty",
138 }
143139 self.assertEqual(all_distros - set(self._distro_info.all), set())
144140
145141 def test_devel(self):
166162
167163 def test_current_unsupported(self):
168164 """Test: List all unsupported Ubuntu distributions today."""
169 unsupported = set(
170 ["warty", "hoary", "breezy", "edgy", "feisty", "gutsy", "intrepid", "jaunty"]
171 )
165 unsupported = {"warty", "hoary", "breezy", "edgy", "feisty", "gutsy", "intrepid", "jaunty"}
172166 self.assertEqual(unsupported - set(self._distro_info.unsupported()), set())
173167
174168 def test_valid(self):