예제 #1
0
def tests():
    ''' Creates a temporary sqlite database and runs the unit tests '''
    print(INFO + '%s : Running unit tests ...' % current_time())
    from tests import setup_database, teardown_database
    db_name = 'test-%04s' % random.randint(0, 9999)
    setup_database(db_name)
    nose.run(module='tests', argv=[os.getcwd() + '/tests'])
    teardown_database(db_name)
예제 #2
0
def tests():
    """ Creates a temporary sqlite database and runs the unit tests """
    print(INFO + "%s : Running unit tests ..." % current_time())
    from tests import setup_database, teardown_database

    db_name = "test-%04s" % random.randint(0, 9999)
    setup_database(db_name)
    nose.run(module="tests", argv=[os.getcwd() + "/tests"])
    teardown_database(db_name)