'Run the unit tests for all the test names in the provided list.
Test names specified may be file or module names, and may optionally
indicate the test case to run by separating the module or file name
from the test case name with a colon. Filenames may be relative or
absolute.
N.B.: The test_labels argument *MUST* be a sequence of
strings, *NOT* just a string object.  (Or you will be
specifying tests for for each character in your string, and
not the whole string.
Examples:
runner.run_tests( (\'test.module\',) )
runner.run_tests([\'another.test:TestCase.test_method\'])
runner.run_tests([\'a.test:TestCase\'])
runner.run_tests([\'/path/to/test/file.py:test_function\'])
runner.run_tests( (\'test.module\', \'a.test:TestCase\') )
Note: the extra_tests argument is currently ignored.  You can
run old non-nose code that uses it without totally breaking,
but the extra tests will not be run.  Maybe later.
Returns the number of tests that failed.'

def run_tests(self, test_labels, extra_tests=None):

    nose_argv = (['nosetests'] + list(test_labels))
    if hasattr(settings, 'NOSE_ARGS'):
        nose_argv.extend(settings.NOSE_ARGS)
    django_opts = ['--noinput', '--liveserver', '-p', '--pattern']
    for opt in BaseCommand.option_list:
        django_opts.extend(opt._long_opts)
        django_opts.extend(opt._short_opts)
    nose_argv.extend((translate_option(opt) for opt in sys.argv[1:] if (opt.startswith('-') and (not any((opt.startswith(d) for d in django_opts))))))
    if (('--verbosity' not in nose_argv) and (not any((opt.startswith('--verbosity=') for opt in nose_argv)))):
        nose_argv.append(('--verbosity=%s' % str(self.verbosity)))
    if (self.verbosity >= 1):
        print('    '.join(nose_argv))
    result = self.run_suite(nose_argv)
    return self.suite_result({}, result)
