def testTupleWithEmptyTupleAttr(self): attrs = {"something2": "()"} attr_dict = AttrDictionary(attrs) a, b = attr_dict.tuple("something", int, (2, 3)) self.assertEqual(2, a) self.assertEqual(3, b)
def testTupleWithoutAttr(self): attrs = {"something2": "(5,6,7)"} attr_dict = AttrDictionary(attrs) a, b, c = attr_dict.tuple("something", int, (1, 2, 3)) self.assertEqual(1, a) self.assertEqual(2, b) self.assertEqual(3, c)
def testTupleAttr(self): attrs = {"something": "(5,6,7)"} attr_dict = AttrDictionary(attrs) a, b, c = attr_dict.tuple("something", int, (1, 2, 3)) self.assertEqual(5, a) self.assertEqual(6, b) self.assertEqual(7, c)