Esempio n. 1
0
class ClassInfoTest(unittest.TestCase):
   def setUp(self):
      self.classInfo = ClassInfo("None", None, None)

   def tearDown(self):
      pass
   
   def testDetailLevelMatchesAll(self):
      for detailLevel in (MAX, ATTRIBUTES, METHODS, TYPES):
         self.assertEqual(True,
                          self.classInfo.detailLevelMatches(detailLevel,detailLevel),
                          "Detail levels should match for detailLevel %s." % detailLevel)

      for detailLevel in (MAX, ATTRIBUTES, METHODS, TYPES):
         self.assertEqual(False,
                          self.classInfo.detailLevelMatches(128, detailLevel),
                          "Detail levels should not match for detailLevel %s." % detailLevel)

      self.assertEqual(True,
                       self.classInfo.detailLevelMatches(MIN, MIN),
                       "Detail levels should match for detailLevel MIN (0).")


      self.assertEqual(False,
                       self.classInfo.detailLevelMatches(MAX, MIN),
                       "Detail levels should not match for detailLevel MIN (0).")
Esempio n. 2
0
 def collectInfoForClass(self, className, frame, event, arg):
     "private"
     if not self.classesInfo.has_key(className):
         self.classesInfo[className] = ClassInfo(
             className, self.classesToCollectInfoAbout,
             self.classesToIgnore)
     classInfo = self.classesInfo[className]
     classInfo.collectInfo(frame, event, arg)
Esempio n. 3
0
 def setUp(self):
    self.classInfo = ClassInfo("None", None, None)