mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #9715 from yegorich/pr/dist/tests/if_lib/cleanup
Pr/dist/tests/if lib/cleanup
This commit is contained in:
commit
7a20a5ec46
3
dist/tests/if_lib/bpt_if.py
vendored
3
dist/tests/if_lib/bpt_if.py
vendored
@ -16,9 +16,6 @@ class BptIf(LLShell):
|
|||||||
"""Getters and setters for the memory map."""
|
"""Getters and setters for the memory map."""
|
||||||
DEVICE_NUM = 0x42A5
|
DEVICE_NUM = 0x42A5
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
def is_connected_to_board(self):
|
def is_connected_to_board(self):
|
||||||
"""Checks if board is connected."""
|
"""Checks if board is connected."""
|
||||||
return self.get_sys_device_num()["data"] == self.DEVICE_NUM
|
return self.get_sys_device_num()["data"] == self.DEVICE_NUM
|
||||||
|
10
dist/tests/if_lib/driver_manager.py
vendored
10
dist/tests/if_lib/driver_manager.py
vendored
@ -13,20 +13,20 @@ from .riot_driver import RiotDriver
|
|||||||
|
|
||||||
def driver_from_config(dev_type='serial', *args, **kwargs):
|
def driver_from_config(dev_type='serial', *args, **kwargs):
|
||||||
"""Returns driver instance given configuration"""
|
"""Returns driver instance given configuration"""
|
||||||
if dev_type is 'serial':
|
if dev_type == 'serial':
|
||||||
return SerialDriver(*args, **kwargs)
|
return SerialDriver(*args, **kwargs)
|
||||||
elif dev_type is 'riot':
|
elif dev_type == 'riot':
|
||||||
return RiotDriver(*args, **kwargs)
|
return RiotDriver(*args, **kwargs)
|
||||||
elif dev_type is 'driver':
|
elif dev_type == 'driver':
|
||||||
return kwargs['driver']
|
return kwargs['driver']
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
|
||||||
def available_configs(dev_type='serial', *args, **kwargs):
|
def available_configs(dev_type='serial', *args, **kwargs):
|
||||||
"""Returns possible configurations to attempt to connect to."""
|
"""Returns possible configurations to attempt to connect to."""
|
||||||
if dev_type is 'serial':
|
if dev_type == 'serial':
|
||||||
return SerialDriver.get_configs(*args, **kwargs)
|
return SerialDriver.get_configs(*args, **kwargs)
|
||||||
elif dev_type is 'riot':
|
elif dev_type == 'riot':
|
||||||
return RiotDriver.get_configs(*args, **kwargs)
|
return RiotDriver.get_configs(*args, **kwargs)
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
3
dist/tests/if_lib/dut_shell.py
vendored
3
dist/tests/if_lib/dut_shell.py
vendored
@ -20,9 +20,6 @@ class DutShell(BaseDevice):
|
|||||||
RESULT_ERROR = 'Error'
|
RESULT_ERROR = 'Error'
|
||||||
RESULT_TIMEOUT = 'Timeout'
|
RESULT_TIMEOUT = 'Timeout'
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _try_parse_data(data):
|
def _try_parse_data(data):
|
||||||
if ('[' in data) and (']' in data):
|
if ('[' in data) and (']' in data):
|
||||||
|
3
dist/tests/if_lib/ll_shell.py
vendored
3
dist/tests/if_lib/ll_shell.py
vendored
@ -24,9 +24,6 @@ class LLShell(BaseDevice):
|
|||||||
RESULT_ERROR = 'Error'
|
RESULT_ERROR = 'Error'
|
||||||
RESULT_TIMEOUT = 'Timeout'
|
RESULT_TIMEOUT = 'Timeout'
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _try_parse_data(data):
|
def _try_parse_data(data):
|
||||||
parsed_data = None
|
parsed_data = None
|
||||||
|
Loading…
Reference in New Issue
Block a user