def METHOD_NAME(self):
    for index, size in enumerate(self._device_spec):
        num_blocks = int(size / self.block_size)
        tmpfile = tempfile.NamedTemporaryFile(suffix="-%d" % index, prefix="test-virtdev-", dir="/var/tmp", delete=False)
        tmpfile.close()
        store = tmpfile.name
        make_store(store, num_blocks, int(self.block_size))
        dev = None
        try:
            dev = get_free_loop_dev()
            make_loop_dev(dev, store)
        except OSError:
            os.unlink(store)
            raise
        self._loop_map.append((dev, store))
        self.loop_devices.append(dev)
    self.addCleanup(self._clean_up)