コード例 #1
0
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)
コード例 #2
0
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)
コード例 #3
0
def test_tempfatfs_oserror():
    try:
        TempFATFS()
    except IOError as e:
        assert isinstance(e, IOError)
        assert isinstance(e.__cause__, OSError)
    else:
        assert False
コード例 #4
0
def test_tempfatfs_calledprocesserror():
    try:
        TempFATFS()
    except IOError as e:
        assert isinstance(e, IOError)
        assert isinstance(e.__cause__, subprocess.CalledProcessError)
    else:
        assert False