Selaa lähdekoodia

Removed unnecessary test cases

Since SinkConfig is a namedtuple now, several of the methods we had been
testing are now inherited from tuple.  There's no need for me to test
those here, so I've removed the unneeded test cases.
Clara Hobbs 6 vuotta sitten
vanhempi
commit
4a22719a2f
1 muutettua tiedostoa jossa 0 lisäystä ja 48 poistoa
  1. 0
    48
      test_pdbuddy/__init__.py

+ 0
- 48
test_pdbuddy/__init__.py Näytä tiedosto

@@ -182,54 +182,6 @@ class SinkConfigTestCase(unittest.TestCase):
182 182
         self.assertEqual(str(self.obj_valid_1a),
183 183
                 "status: valid\nflags: (none)\nv: 15.00 V\ni: 1.00 A")
184 184
 
185
-    def test_eq_none(self):
186
-        self.assertTrue(self.obj_none == pdbuddy.SinkConfig(None, None, None,
187
-            None))
188
-
189
-    def test_eq_valid(self):
190
-        # Set invalid object as valid
191
-        self.obj_invalid = self.obj_invalid._replace(status=pdbuddy.SinkStatus.VALID)
192
-
193
-        self.assertTrue(self.obj_valid == self.obj_invalid)
194
-
195
-    def test_eq_wrong_type(self):
196
-        self.assertFalse(self.obj_none == "hello world")
197
-
198
-    def test_eq_wrong_status(self):
199
-        self.assertFalse(self.obj_valid == self.obj_invalid)
200
-
201
-    def test_eq_wrong_flags(self):
202
-        self.assertFalse(self.obj_valid == self.obj_valid_gb)
203
-
204
-    def test_eq_wrong_voltage(self):
205
-        self.assertFalse(self.obj_valid == self.obj_valid_5v)
206
-
207
-    def test_eq_wrong_current(self):
208
-        self.assertFalse(self.obj_valid == self.obj_valid_1a)
209
-
210
-    def test_ne_none(self):
211
-        self.assertFalse(self.obj_none != pdbuddy.SinkConfig(None, None, None,
212
-            None))
213
-
214
-    def test_ne_valid(self):
215
-        # Set invalid object as valid
216
-        self.obj_invalid = self.obj_invalid._replace(status=pdbuddy.SinkStatus.VALID)
217
-
218
-        self.assertFalse(self.obj_valid != self.obj_invalid)
219
-
220
-    def test_ne_wrong_type(self):
221
-        self.assertTrue(self.obj_none != "hello world")
222
-
223
-    def test_ne_wrong_status(self):
224
-        self.assertTrue(self.obj_valid != self.obj_invalid)
225
-
226
-    def test_hash_identical(self):
227
-        self.assertEqual(hash(self.obj_none), hash(pdbuddy.SinkConfig(None,
228
-            None, None, None)))
229
-
230
-    def test_hash_different(self):
231
-        self.assertNotEqual(hash(self.obj_none), hash(self.obj_valid))
232
-
233 185
     def test_from_text_none(self):
234 186
         ft_none = pdbuddy.SinkConfig.from_text([])
235 187
         self.assertEqual(ft_none, self.obj_none)

Loading…
Peruuta
Tallenna