def loadTestsFromFile(self, filename):
        """Load tests from a non-module file. Default is to raise a
        ValueError; plugins may implement `loadTestsFromFile` to
        provide a list of tests loaded from the file.
        """
        log.debug("Load from non-module file %s", filename)
        try:
            tests = [test for test in
                     self.config.plugins.loadTestsFromFile(filename)]
            if tests:
                # Plugins can yield False to indicate that they were
                # unable to load tests from a file, but it was not an
                # error -- the file just had no tests to load.
                tests = filter(None, tests)
                return self.suiteClass(tests)
            else:
                # Nothing was able to even try to load from this file
                open(filename, 'r').close() # trigger os error
                raise ValueError("Unable to load tests from file %s"
                                 % filename)
        except (KeyboardInterrupt, SystemExit):
            raise
        except:
            exc = sys.exc_info()
            return self.suiteClass(
                [Failure(exc[0], exc[1], exc[2],
                         address=(filename, None, None))])
def loadTestsFromFile ( self , filename ) : log . debug ( "Load from non-module file %s" , filename ) try : tests = [ test for test in self . config . plugins . loadTestsFromFile ( filename ) ] if tests : tests = filter ( None , tests ) return self . suiteClass ( tests ) else : open ( filename , 'r' ) . close ( ) raise ValueError ( "Unable to load tests from file %s" % filename ) except ( KeyboardInterrupt , SystemExit ) : raise except : exc = sys . exc_info ( ) return self . suiteClass ( [ Failure ( exc [ 0 ] , exc [ 1 ] , exc [ 2 ] , address = ( filename , None , None ) ) ] )
Load tests from a non-module file. Default is to raise a
        ValueError; plugins may implement `loadTestsFromFile` to
        provide a list of tests loaded from the file.