Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests broken (maybe openrpc changed?) #94

Closed
BenediktBurger opened this issue Aug 20, 2024 · 1 comment · Fixed by #95
Closed

Tests broken (maybe openrpc changed?) #94

BenediktBurger opened this issue Aug 20, 2024 · 1 comment · Fixed by #95
Labels
bug Something isn't working dependency Related to external libraries.

Comments

@BenediktBurger
Copy link
Member

A test regarding openrpc fails (see https://github.com/pymeasure/pyleco/actions/runs/10473269206):

__________________ Test_discover_method.test_fail[RPCServer1] __________________

self = <test_rpc_server.Test_discover_method object at 0x7f83c6102040>
methods = [{'examples': [{'params': [{'name': 'arg', 'value': None}], 'result': {'value': {}}}], 'name': 'sem', 'params': [{'nam...ue, 'schema': {'title': 'Arg1', 'type': 'number'}}], 'result': {'name': 'result', 'schema': {'title': 'Result'}}, ...}]

    def test_fail(self, methods: list):
        m = methods[2]
        assert m["name"] == "fail"
>       assert m["description"] == fail.__doc__
E       KeyError: 'description'

tests/json_utils/test_rpc_server.py:167: KeyError

It only happens on Python >=3.9, suggesting, that it has to do with openrpc package (see #90 ).

@BenediktBurger BenediktBurger added bug Something isn't working dependency Related to external libraries. labels Aug 20, 2024
@BenediktBurger
Copy link
Member Author

In fact, openrpc changed treating a docstring as description to making summary be the first line of the docstring and the multi line description enters description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependency Related to external libraries.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant