def setUp(self):
    'Get all the PROTO files to be tested.'
    self.version = None
    with open(((((os.environ['WEBOTS_HOME'] + os.sep) + 'resources') + os.sep) + 'version.txt')) as file:
        content = file.read()
        self.version = content.splitlines()[0].strip().split()[0]
    self.files = []
    for (rootPath, dirNames, fileNames) in os.walk(os.environ['WEBOTS_HOME']):
        dirNames[:] = [d for d in dirNames if (d not in skippedDirectories)]
        for fileName in fnmatch.filter(fileNames, '*.proto'):
            proto = os.path.join(rootPath, fileName)
            shouldIgnore = False
            for ignoredProto in ignoredProtos:
                path = ((os.environ['WEBOTS_HOME'] + os.sep) + ignoredProto.replace('/', os.sep))
                if (proto == path):
                    shouldIgnore = True
                    break
            if (not shouldIgnore):
                self.files.append((proto, ('#VRML_SIM %s utf8' % self.version)))
    for (rootPath, dirNames, fileNames) in os.walk(os.environ['WEBOTS_HOME']):
        dirNames[:] = [d for d in dirNames if (d not in skippedDirectories)]
        for fileName in fnmatch.filter(fileNames, '*.wbt'):
            world = os.path.join(rootPath, fileName)
            self.files.append((world, ('#VRML_SIM %s utf8' % self.version)))
    for (rootPath, dirNames, fileNames) in os.walk(os.environ['WEBOTS_HOME']):
        dirNames[:] = [d for d in dirNames if (d not in skippedDirectories)]
        for fileName in fnmatch.filter(fileNames, '*.wbproj'):
            projFile = os.path.join(rootPath, fileName)
            self.files.append((projFile, ('Webots Project File version %s' % self.version)))
Get all the PROTO files to be tested.
def setUp(self):
    
    self.version = None
    with open(((((os.environ['WEBOTS_HOME'] + os.sep) + 'resources') + os.sep) + 'version.txt')) as file:
        content = file.read()
        self.version = content.splitlines()[0].strip().split()[0]
    self.files = []
    for (rootPath, dirNames, fileNames) in os.walk(os.environ['WEBOTS_HOME']):
        dirNames[:] = [d for d in dirNames if (d not in skippedDirectories)]
        for fileName in fnmatch.filter(fileNames, '*.proto'):
            proto = os.path.join(rootPath, fileName)
            shouldIgnore = False
            for ignoredProto in ignoredProtos:
                path = ((os.environ['WEBOTS_HOME'] + os.sep) + ignoredProto.replace('/', os.sep))
                if (proto == path):
                    shouldIgnore = True
                    break
            if (not shouldIgnore):
                self.files.append((proto, ('#VRML_SIM %s utf8' % self.version)))
    for (rootPath, dirNames, fileNames) in os.walk(os.environ['WEBOTS_HOME']):
        dirNames[:] = [d for d in dirNames if (d not in skippedDirectories)]
        for fileName in fnmatch.filter(fileNames, '*.wbt'):
            world = os.path.join(rootPath, fileName)
            self.files.append((world, ('#VRML_SIM %s utf8' % self.version)))
    for (rootPath, dirNames, fileNames) in os.walk(os.environ['WEBOTS_HOME']):
        dirNames[:] = [d for d in dirNames if (d not in skippedDirectories)]
        for fileName in fnmatch.filter(fileNames, '*.wbproj'):
            projFile = os.path.join(rootPath, fileName)
            self.files.append((projFile, ('Webots Project File version %s' % self.version)))