Exemplo n.º 1
0
def getArgs():
    """Gets the arguments of the program.
    Returns a tuple containting:
    (qty to launch, arguments to pass to the bootstrap module)."""
    try:
        nb_to_launch = int(sys.argv[1])
    except:
        nb_to_launch = 0

    if nb_to_launch == 0:
        nb_to_launch = getCPUcount()

    try:
        verbosity = int(sys.argv[2])
    except:
        verbosity = 3

    return nb_to_launch, verbosity, sys.argv[3:]
Exemplo n.º 2
0
 def test_getCpuCount(self):
     """Since we don't know how many cores has the computer on which these
     tests will be run, we check that at least, getCPUcount() returns an
     int larger than 0."""
     self.assertIsInstance(utils.getCPUcount(), int)
     self.assertTrue(utils.getCPUcount() > 0)
Exemplo n.º 3
0
 def test_getCpuCount(self):
     """Since we don't know how many cores has the computer on which these
     tests will be run, we check that at least, getCPUcount() returns an
     int larger than 0."""
     self.assertIsInstance(utils.getCPUcount(), int)
     self.assertTrue(utils.getCPUcount() > 0)