# Path: Tools/Test.py
# class TestSuite(Verbosity):
#     # Constructor for a set of tests. Parameters:
#     #
#     # sName -- Name of this testsuite
#     #
#     # bIsMain -- If true, this is the main test which will display
#     #            all collected statistics
#     def  __init__(self, sName, bIsMain=0):
#         self.lTests   = []
#         self.sName    = sName
#         self.nNumber  = 0
#         self.bIsMain  = bIsMain
#         self.nVerbose = self.verbFAILURES
#         self.SetIndent(0)
#         for i in range(len(sys.argv)):
#             if sys.argv[i]=="-v":
#                 try:
#                     # try to convert the next argument to a number
#                     # (if an error occurs, just increase the
#                     # verbosity by 1).
#                     n = string.atoi(sys.argv[i+1])
#                     self.nVerbose=n
#                 except:
#                     self.nVerbose=self.nVerbose+1
#     # --------------------------------------------------------------------
#     # Set verbosity of this test suite (and therefore of all included tests)
#     def SetVerbose(self, nVerbose):
#         self.nVerbose=nVerbose
#         for i in self.lTests:
#             i.SetVerbose(nVerbose)
#     # --------------------------------------------------------------------
#     # Set verbosity of test
#     def SetIndent(self, nIndent):
#         self.nIndent  = nIndent
#         self.sIndent  = " "*nIndent
#         for i in self.lTests:
#             i.SetIndent(nIndent+2)
#     # --------------------------------------------------------------------
#     def GetNumberOfTests(self): 
#         return self.nNumber
#     # --------------------------------------------------------------------
#     # Add a test case or a test suite to this test suite!!
#     def AddTest(self, t): 
#         self.lTests.append(t)
#         t.SetVerbose(self.nVerbose)
#         t.SetIndent(self.nIndent+2)
#         self.nNumber = self.nNumber + t.GetNumberOfTests()
# 
#     # --------------------------------------------------------------------
#     def RunAllTests(self):
#         if self.nVerbose>=self.verbNAME or self.bIsMain:
#             print "\n%sRunning %s"%(self.sIndent, self.sName)
#             print "%s%s"%(self.sIndent, "="*(8+len(self.sName)))
#         nCount   = 0
#         nFail    = 0
#         nSuccess = 0
#         for i in self.lTests:
#             c,f,s    = i.RunAllTests()
#             nCount   = nCount   + c
#             nFail    = nFail    + f
#             nSuccess = nSuccess + s
#         if self.nVerbose>=self.verbNAME or self.bIsMain:
#             print "%s%s finished"%(self.sIndent, self.sName)
#         if self.nVerbose>=self.verbNAME or self.bIsMain:
#             print "%s============================================="%\
#                   self.sIndent
#             print "%sTests ran: %d, failed: %d, successful: %d\n"%\
#                   (self.sIndent, nCount,nFail, nSuccess)
#         return (nCount, nFail, nSuccess)


from Tools.Test import TestSuite
from Test       import ScannerTest
    import sys
        import profile
#!/usr/bin/env python


# ===========================================================================
def CreateScannerTestSuite():
    ts = TestSuite("All Scanner Tests", bIsMain=1)
    ts.AddTest(ScannerTest.FixedScannerTest())
    ts.AddTest(ScannerTest.FreeScannerTest() )
    return ts
# ===========================================================================

if __name__=="__main__":
    if len(sys.argv)>1 and sys.argv[1]=="-p":
        ts=CreateScannerTestSuite()

# Path: Tools/Test.py
# class TestSuite(Verbosity):
#     # Constructor for a set of tests. Parameters:
#     #
#     # sName -- Name of this testsuite
#     #
#     # bIsMain -- If true, this is the main test which will display
#     #            all collected statistics
#     def  __init__(self, sName, bIsMain=0):
#         self.lTests   = []
#         self.sName    = sName
#         self.nNumber  = 0
#         self.bIsMain  = bIsMain
#         self.nVerbose = self.verbFAILURES
#         self.SetIndent(0)
#         for i in range(len(sys.argv)):
#             if sys.argv[i]=="-v":
#                 try:
#                     # try to convert the next argument to a number
#                     # (if an error occurs, just increase the
#                     # verbosity by 1).
#                     n = string.atoi(sys.argv[i+1])
#                     self.nVerbose=n
#                 except:
#                     self.nVerbose=self.nVerbose+1
#     # --------------------------------------------------------------------
#     # Set verbosity of this test suite (and therefore of all included tests)
#     def SetVerbose(self, nVerbose):
#         self.nVerbose=nVerbose
#         for i in self.lTests:
#             i.SetVerbose(nVerbose)
#     # --------------------------------------------------------------------
#     # Set verbosity of test
#     def SetIndent(self, nIndent):
#         self.nIndent  = nIndent
#         self.sIndent  = " "*nIndent
#         for i in self.lTests:
#             i.SetIndent(nIndent+2)
#     # --------------------------------------------------------------------
#     def GetNumberOfTests(self): 
#         return self.nNumber
#     # --------------------------------------------------------------------
#     # Add a test case or a test suite to this test suite!!
#     def AddTest(self, t): 
#         self.lTests.append(t)
#         t.SetVerbose(self.nVerbose)
#         t.SetIndent(self.nIndent+2)
#         self.nNumber = self.nNumber + t.GetNumberOfTests()
# 
#     # --------------------------------------------------------------------
#     def RunAllTests(self):
#         if self.nVerbose>=self.verbNAME or self.bIsMain:
#             print "\n%sRunning %s"%(self.sIndent, self.sName)
#             print "%s%s"%(self.sIndent, "="*(8+len(self.sName)))
#         nCount   = 0
#         nFail    = 0
#         nSuccess = 0
#         for i in self.lTests:
#             c,f,s    = i.RunAllTests()
#             nCount   = nCount   + c
#             nFail    = nFail    + f
#             nSuccess = nSuccess + s
#         if self.nVerbose>=self.verbNAME or self.bIsMain:
#             print "%s%s finished"%(self.sIndent, self.sName)
#         if self.nVerbose>=self.verbNAME or self.bIsMain:
#             print "%s============================================="%\
#                   self.sIndent
#             print "%sTests ran: %d, failed: %d, successful: %d\n"%\
#                   (self.sIndent, nCount,nFail, nSuccess)
#         return (nCount, nFail, nSuccess)


# Path: Scanner/RunAllTests.py
from Tools.Test import TestSuite
from Test       import ScannerTest
    import sys
        import profile

#!/usr/bin/env python


# ===========================================================================
def CreateScannerTestSuite():
    ts = TestSuite("All Scanner Tests", bIsMain=1)
    ts.AddTest(ScannerTest.FixedScannerTest())
    ts.AddTest(ScannerTest.FreeScannerTest() )
    return ts
# ===========================================================================

if __name__=="__main__":
    if len(sys.argv)>1 and sys.argv[1]=="-p":
        ts=CreateScannerTestSuite()

        profile.run("ts.RunAllTests()")