def test_xdict_sum_vals_string_type(self):
     xd = XDict({'one': '1', 'two': '2', 'three': '3'})
     with self.assertRaises(
             TypeError
     ):  # raises TypeError when inappropriate types in the XDict vals
         xd.sum_vals()
Exemple #2
0
 def test_xdict_sum_vals_string_type(self):
     xd = XDict({'one': '1', 'two': '2', 'three': '3'})
     with self.assertRaises(TypeError): # raises TypeError when inappropriate types in the XDict vals
         xd.sum_vals()
 def test_xdict_sum_vals(self):
     xd = XDict({'one': 1, 'two': 2, 'three': 3})
     self.assertEqual(xd.sum_vals(), 6)
Exemple #4
0
 def test_xdict_sum_vals(self):
     xd = XDict({'one': 1, 'two': 2, 'three': 3})
     self.assertEqual(xd.sum_vals(), 6)