def run_tests():
    django.setup()
    test_runner_class = get_runner(settings)

    try:
        import xmlrunner

        class XMLTestRunner(test_runner_class):
            def run_suite(self, suite, **kwargs):
                verbosity = getattr(settings, 'TEST_OUTPUT_VERBOSE', 1)
                if isinstance(verbosity, bool):
                    verbosity = (1, 2)[verbosity]
                descriptions = getattr(settings, 'TEST_OUTPUT_DESCRIPTIONS', False)
                output = getattr(settings, 'TEST_OUTPUT_DIR', '.')

                return xmlrunner.XMLTestRunner(
                    verbosity=verbosity,
                    descriptions=descriptions,
                    output=output
                ).run(suite)
        test_runner_class = XMLTestRunner
    except __HOLE__:
        print "Not generating XML reports, run 'pip install unittest-xml-reporting' to enable XML report generation"

    test_runner = test_runner_class(verbosity=2, interactive=True)

    failures = test_runner.run_tests([])
    sys.exit(bool(failures))
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/server/test_runner.py/run_tests