Add real robot devices and scripts to control real robot (#288)

Co-authored-by: Simon Alibert <alibert.sim@gmail.com>
这个提交包含在:
Remi
2024-07-15 17:43:10 +02:00
提交者 GitHub
父节点 5ffcb48a9a
当前提交 5e54e39795
共有 32 个文件被更改,包括 3068 次插入 和 46 次删除

查看文件

@ -147,3 +147,22 @@ def require_package(package_name):
return wrapper
return decorator
def require_koch(func):
"""
Decorator that skips the test if an alexander koch robot is not available
"""
@wraps(func)
def wrapper(*args, **kwargs):
# Access the pytest request context to get the is_koch_available fixture
request = kwargs.get("request")
if request is None:
raise ValueError("The 'request' fixture must be passed to the test function as a parameter.")
if not request.getfixturevalue("is_koch_available"):
pytest.skip("An alexander koch robot is not available.")
return func(*args, **kwargs)
return wrapper