Пример #1
0
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
Пример #2
0
    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)
Пример #3
0
def test_list_probes():
    """Basic test of listing connected probes."""
    probes = PyPemicro.list_ports()
    assert isinstance(probes, list)
Пример #4
0
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
Пример #5
0
def test_lib_version():
    """Basic test of dynamic library version."""
    pemicro = PyPemicro()
    version = pemicro.version()
    assert isinstance(version, str)
    assert len(version) > 10
Пример #6
0
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