(self, file_and_modules_and_module_name)
return ret
returns the unittests given a list of modules
returns the unittests given a list of modules
returns the unittests given a list of modules
def find_tests_from_modules(self, file_and_modules_and_module_name):
        """ returns the unittests given a list of modules """
        #Use our own suite!
        from _pydev_runfiles import pydev_runfiles_unittest
        import unittest
        unittest.TestLoader.suiteClass = pydev_runfiles_unittest.PydevTestSuite
        loader = unittest.TestLoader()

        ret = []
        if self.files_to_tests:
            for pyfile, m, module_name in file_and_modules_and_module_name:
                accepted_classes = {}
                accepted_methods = {}
                tests = self.files_to_tests[pyfile]
                for t in tests:
                    accepted_methods[t] = t

                loader.getTestCaseNames = self.GetTestCaseNames(accepted_classes, accepted_methods)

                suite = loader.loadTestsFromModule(m)
                if self._decorate_test_suite(suite, pyfile, module_name):
                    ret.append(suite)
            return ret


        if self.tests:
            accepted_classes = {}
            accepted_methods = {}

            for t in self.tests:
                splitted = t.split('.')
                if len(splitted) == 1:
                    accepted_classes[t] = t

                elif len(splitted) == 2:
                    accepted_methods[t] = t

            loader.getTestCaseNames = self.GetTestCaseNames(accepted_classes, accepted_methods)


        for pyfile, m, module_name in file_and_modules_and_module_name:
            suite = loader.loadTestsFromModule(m)
            if self._decorate_test_suite(suite, pyfile, module_name):
                ret.append(suite)

        return ret
def find_tests_from_modules ( self , file_and_modules_and_module_name ) : #Use our own suite! from _pydev_runfiles import pydev_runfiles_unittest import unittest unittest . TestLoader . suiteClass = pydev_runfiles_unittest . PydevTestSuite loader = unittest . TestLoader ( ) ret = [ ] if self . files_to_tests : for pyfile , m , module_name in file_and_modules_and_module_name : accepted_classes = { } accepted_methods = { } tests = self . files_to_tests [ pyfile ] for t in tests : accepted_methods [ t ] = t loader . getTestCaseNames = self . GetTestCaseNames ( accepted_classes , accepted_methods ) suite = loader . loadTestsFromModule ( m ) if self . _decorate_test_suite ( suite , pyfile , module_name ) : ret . append ( suite ) return ret if self . tests : accepted_classes = { } accepted_methods = { } for t in self . tests : splitted = t . split ( '.' ) if len ( splitted ) == 1 : accepted_classes [ t ] = t elif len ( splitted ) == 2 : accepted_methods [ t ] = t loader . getTestCaseNames = self . GetTestCaseNames ( accepted_classes , accepted_methods ) for pyfile , m , module_name in file_and_modules_and_module_name : suite = loader . loadTestsFromModule ( m ) if self . _decorate_test_suite ( suite , pyfile , module_name ) : ret . append ( suite ) return ret