コード例 #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:]
コード例 #2
0
ファイル: tests_parser.py プロジェクト: cuiyungao/scoop
 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)
コード例 #3
0
ファイル: tests_parser.py プロジェクト: wvangeit/scoop
 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)