Exemplo n.º 1
0
    def testGetMaxEvents(self):
        """
        test class for getMaxEvents in Mask.py

        """

        #The way I've decided to implement this depends on SetMaxAndSkipEvents()
        #Therefore a failure in one will result in a failure in the second
        #I'm not sure if this is the best way, but it's the one users will use
        #The problem is that it's called in reverse order by unittest so you have to
        #remember that.
        # -mnorman

        testMask = Mask()
        maxEvents  = 100
        skipEvents = 0

        tempMax = testMask.getMaxEvents()

        self.assertEqual(tempMax, None)

        testMask.setMaxAndSkipEvents(maxEvents, skipEvents)

        tempMax = testMask.getMaxEvents()

        self.assertEqual(tempMax, maxEvents + skipEvents)
Exemplo n.º 2
0
    def testGetMaxEvents(self):
        """
        test class for getMaxEvents in Mask.py

        """

        #The way I've decided to implement this depends on SetMaxAndSkipEvents()
        #Therefore a failure in one will result in a failure in the second
        #I'm not sure if this is the best way, but it's the one users will use
        #The problem is that it's called in reverse order by unittest so you have to
        #remember that.
        # -mnorman

        testMask = Mask()
        maxEvents = 100
        skipEvents = 0

        tempMax = testMask.getMaxEvents()

        self.assertEqual(tempMax, None)

        testMask.setMaxAndSkipEvents(maxEvents, skipEvents)

        tempMax = testMask.getMaxEvents()

        self.assertEqual(tempMax, maxEvents + skipEvents)