Ejemplo n.º 1
0
def test_unpack_not_none():
    for filename in os.listdir("tests/files"):
        if os.path.isdir("tests/files/%s" % filename):
            continue

        for unpacker in plugins.values():
            if not unpacker(None).supported():
                continue
            assert unpacker(f(filename)).unpack() is not None
Ejemplo n.º 2
0
def supported():
    """Returns the supported extensions for this machine. Support for the
    unpacking of numerous file extensions depends on different system packages
    which should be installed on the machine."""
    ret = []
    for plugin in plugins.values():
        if plugin(None).supported():
            for ext in make_list(plugin.exts):
                ret.append(ext)
    return ret
Ejemplo n.º 3
0
def supported():
    """Returns the supported extensions for this machine. Support for the
    unpacking of numerous file extensions depends on different system packages
    which should be installed on the machine."""
    ret = []
    for plugin in plugins.values():
        if plugin(None).supported():
            if isinstance(plugin.exts, basestring):
                ret.append(plugin.exts)
            else:
                ret.extend(plugin.exts)
    return ret
Ejemplo n.º 4
0
def supported():
    """Returns the supported extensions for this machine. Support for the
    unpacking of numerous file extensions depends on different system packages
    which should be installed on the machine."""
    ret = []
    for plugin in plugins.values():
        if plugin(None).supported():
            if isinstance(plugin.exts, basestring):
                ret.append(plugin.exts)
            else:
                ret.extend(plugin.exts)
    return ret
Ejemplo n.º 5
0
def test_unpack_not_none():
    for filename in os.listdir("tests/files"):
        if os.path.isdir("tests/files/%s" % filename):
            continue

        for unpacker in plugins.values():
            if not unpacker(None).supported():
                continue

            try:
                u = unpacker(f(filename)).unpack()
                assert isinstance(u, list)
            except UnpackException as e:
                assert e.state is not None