def test_tempfatfs(): try: fatfs = TempFATFS() except (IOError, OSError): raise SkipTest("Cannot mount FAT filesystems with FUSE") with fatfs as tmp_dir: assert os.path.exists(tmp_dir)
def test_tempfatfs(): try: fatfs = TempFATFS() except (IOError, OSError): warnings.warn("Cannot mount FAT filesystems with FUSE") else: with fatfs as tmpdir: yield assert_true, os.path.exists(tmpdir)
def test_tempfatfs_oserror(): try: TempFATFS() except IOError as e: assert isinstance(e, IOError) assert isinstance(e.__cause__, OSError) else: assert False
def test_tempfatfs_calledprocesserror(): try: TempFATFS() except IOError as e: assert isinstance(e, IOError) assert isinstance(e.__cause__, subprocess.CalledProcessError) else: assert False