Exemple #1
0
def test(*args):
    "Run all unit tests."
    os.chdir(ROOTDIR)
    #~ param.debug = False
    #~ param.verbose = False
    from runtests import test
    test(*args, blacklist = SKIP_DIRS)
Exemple #2
0
def test(*args):
    "Run all unit tests."
    os.chdir(ROOTDIR)
    param.debug = False
    param.verbose = False
    from runtests import test
    test(*args, blacklist=SKIP_DIRS)
Exemple #3
0
def all(*args):
    "Run all tests and doctests."
    test(*args)
    doctest(*args)
Exemple #4
0
    For example:
    - Launch all unit tests concerning geolib:
        $ ./tools/test.py geolib
    - Launch all unit tests contained in geolib/test_objets.py
        $ ./tools/test.py objets
    """)
    sys.exit()



# Actions are launched
if args:
    if args[0].startswith('--'):
        action = args[0][2:]
        args = args[1:]
    elif args[0].startswith('-'):
        act = args[0][1:]
        args = args[1:]
        if act in actions:
            action = actions[act]
        else:
            help()
    else:
        action = 'test'
    if action in actions.values():
        locals()[action](*args)
    else:
        help()
else:
    test()
Exemple #5
0
def all(*args):
    "Run all tests and doctests."
    test(*args)
    doctest(*args)
Exemple #6
0
    Note that you may test only a few modules.
    For example:
    - Launch all unit tests concerning geolib:
        $ ./tools/test.py geolib
    - Launch all unit tests contained in geolib/test_objets.py
        $ ./tools/test.py objets
    """)
    sys.exit()


# Actions are launched
if args:
    if args[0].startswith('--'):
        action = args[0][2:]
        args = args[1:]
    elif args[0].startswith('-'):
        act = args[0][1:]
        args = args[1:]
        if act in actions:
            action = actions[act]
        else:
            help()
    else:
        action = 'test'
    if action in actions.itervalues():
        locals()[action](*args)
    else:
        help()
else:
    test()