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)
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)