def main(): args_parser = argparse.ArgumentParser( description="Tests get_version.") options = args_parser.parse_args() try: pyolecf.get_version() except Exception: return False return True
def test_get_version(self): """Tests the get_version function.""" version = pyolecf.get_version() self.assertIsNotNone(version)
import logging import pyolecf from plaso.lib import errors from plaso.lib import parser from plaso.lib import plugin from plaso.parsers.olecf_plugins import interface # Register all OLECF plugins. # pylint: disable=unused-import from plaso.parsers import olecf_plugins if pyolecf.get_version() < '20131012': raise ImportWarning('OleCfParser requires at least pyolecf 20131012.') class OleCfParser(parser.BaseParser): """Parses OLE Compound Files (OLECF).""" NAME = 'olecf' def __init__(self, pre_obj, config=None): """Initializes the parser. Args: pre_obj: pre-parsing object. config: configuration object. """
def test_get_version(self): """Tests the get_version function.""" version = pyolecf.get_version()