def run_tests(*args): from django_comments_xtd.tests import run_tests errors = run_tests() if errors: sys.exit(1) else: sys.exit(0)