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
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
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
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