#NEWLINE# def run_tests( self , test_labels , extra_tests = None , **kwargs ) : #NEWLINE# #INDENT# "\n        Run the unit tests for all the test labels in the provided list.\n        Labels must be of the form:\n         - app.TestClass.test_method\n            Run a single specific test method\n         - app.TestClass\n            Run all the test methods in a given class\n         - app\n            Search for doctests and unittests in the named application.\n\n        When looking for tests, the test runner will look in the models and\n        tests modules for the application.\n\n        A list of 'extra' tests may also be provided; these tests\n        will be added to the test suite.\n\n        Returns the number of tests that failed.\n        " #NEWLINE# self . setup_test_environment ( ) #NEWLINE# suite = self . build_suite ( test_labels , extra_tests ) #NEWLINE# old_config = self . setup_databases ( ) #NEWLINE# result = self . run_suite ( suite ) #NEWLINE# self . teardown_databases ( old_config ) #NEWLINE# self . teardown_test_environment ( ) #NEWLINE# return self . suite_result ( suite , result )