Esempio n. 1
0
    def __iter__(self):
        """ Walk through each given trait.

        Any class source is walked through for its contents.
        """
        for trait in flatten(map(TraitSource, self.__traits)):
            yield trait
Esempio n. 2
0
    def __iter__(self):
        """ Walk through each given trait.

        Any class source is walked through for its contents.
        """
        for trait in flatten(map(TraitSource, self.__traits)):
            yield trait
Esempio n. 3
0
 def test_can_be_flattened(self):
     flat = flatten(self.classtype)
     self.assertEqual(sorted([str(f) for f in list(flat)]),
                      ['classmethod', 'method', 'property', 'staticmethod'])
Esempio n. 4
0
 def test_can_be_flattened(self):
     flat = flatten(self.classtype)
     self.assertEqual(sorted([str(f) for f in list(flat)]),
                      ['classmethod', 'method', 'property', 'staticmethod'])