def test_lib_dll_version(): """Basic test of dynamic library dll version.""" pemicro = PyPemicro() pemicro.lib = PyPemicro.get_pemicro_lib() version = pemicro.version_dll() assert isinstance(version, int) assert version > 1
def get_pemicro_lib(cls) -> PyPemicro: """Get J-Link object. :return: The J-Link Object :raises DebugProbeError: The J-Link object get function failed. """ return PyPemicro(log_info=PEMICRO_LOGGER.info, log_debug=PEMICRO_LOGGER.debug, log_err=PEMICRO_LOGGER.error, log_war=PEMICRO_LOGGER.warn)
def test_list_probes(): """Basic test of listing connected probes.""" probes = PyPemicro.list_ports() assert isinstance(probes, list)
def test_list_devices(): """Basic test of listing connected devices.""" pemicro = PyPemicro() devices = pemicro.get_device_list() assert isinstance(devices, list) assert len(devices) > 100
def test_lib_version(): """Basic test of dynamic library version.""" pemicro = PyPemicro() version = pemicro.version() assert isinstance(version, str) assert len(version) > 10
def test_library_load(): """Simple test to be able to load library on current system""" assert PyPemicro.get_pemicro_lib()
def get_safe_libs(): from pypemicro import PyPemicro libs = PyPemicro.get_pemicro_lib_list() return libs