예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
    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)