Exemplo n.º 1
0
    def _collect_file(self, path, prefixed_path, source_storage):
        source_path = source_storage.path(path)
        target_path = prefixed_path
        filter = filters.find_by_input_path(prefixed_path)

        if filter and not filter.is_filterable(prefixed_path):
            self.log("Skipping '%s' (filter dependency)" % path)
        else:
            if filter:
                target_path, source_storage = self._filter_file(
                    filter, prefixed_path, source_path, source_storage)
            self._copy_file(source_path, target_path, source_storage)
            if not prefixed_path in self.copied_files:
                self.copied_files.append(prefixed_path)

        return (source_path, target_path, source_storage)
Exemplo n.º 2
0
 def test_find_by_input_path(self):
     assert_is_instance(filters.find_by_input_path('main.in'), Filter1)
     assert_is_instance(filters.find_by_input_path('main.in1'), Filter1)
     assert_is_instance(filters.find_by_input_path('main.in2'), Filter2)
     assert_equal(None, filters.find_by_input_path('main.out'))