def mountroot_for_test(test_case):
 mountroot = FilePath(test_case.mktemp())
 mountroot.makedirs()
 test_case.addCleanup(umount_all, mountroot)
 return mountroot

def mountroot_for_test ( test_case ) : mountroot = FilePath ( test_case . mktemp ( ) ) mountroot . makedirs ( ) test_case . addCleanup ( umount_all , mountroot ) return mountroot
create a mountpoint root directory and unmount any filesystems with mount points beneath that directory when the test exits .