def test_update_exceptions(self): a = VDFDict() with self.assertRaises(TypeError): a.update(None) with self.assertRaises(TypeError): a.update(1) with self.assertRaises(TypeError): a.update("asd zxc") with self.assertRaises(ValueError): a.update([(1, 1, 1), (2, 2, 2)])
def test_update_exceptions(self): a = VDFDict() with self.assertRaises(TypeError): a.update(None) with self.assertRaises(TypeError): a.update(1) with self.assertRaises(TypeError): a.update("asd zxc") with self.assertRaises(ValueError): a.update([(1,1,1), (2,2,2)])
def test_update(self): a = VDFDict([("1", 2), ("1", 2), ("5", 3), ("1", 2)]) b = VDFDict() b.update([("1", 2), ("1", 2)]) b.update([("5", 3), ("1", 2)]) self.assertEqual(list(a.items()), list(b.items()))
def test_update(self): a = VDFDict([("1",2),("1",2),("5",3),("1",2)]) b = VDFDict() b.update([("1",2),("1",2)]) b.update([("5",3),("1",2)]) self.assertEqual(list(a.items()), list(b.items()))