views:

41

answers:

1

I have developed fuse fs with python and now want to write tests for it. Before testing I mount fs to some dir:


    fs = MyFuseFS()
    fs.parse(errex=1, ['some_dir'])
    fs.main()

After testing I want unmount my fs, want to do something like this:


fs.unmount()

Is it something like "unmount" method? Maybe there is another ways to unmount fs?

+2  A: 

http://packages.python.org/fs/expose/fuse.html

you can see what you need from this link.

>>> from fs.memoryfs import MemoryFS
>>> from fs.expose import fuse
>>> fs = MemoryFS()
>>> mp = fuse.mount(fs,"/mnt/my-memory-fs")
>>> mp.unmount()

you guessed the function name right :)

huseyinalb