Skip to content

Conversation

@jelly
Copy link
Collaborator

@jelly jelly commented Oct 18, 2025

No description provided.

jelly added 3 commits October 18, 2025 16:44
Introduce a re-usable server_factory fixture to spin up and teardown a varlink test server. Allowing most of the tests to be ported over to pytest assertions.
The three tests use the same test logic	so combine them into one test with pytest parametrize's decorator.
Construct `ServiceRequestHandler` once and re-use it in the fixture.
Comment on lines +31 to +36
yield _create_server

for srv, srv_thread in servers:
srv.shutdown()
srv.server_close()
srv_thread.join()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If something goes wrong, it'll probably crash anyway, but maybe we can be on the safe side here

Suggested change
yield _create_server
for srv, srv_thread in servers:
srv.shutdown()
srv.server_close()
srv_thread.join()
try:
yield _create_server
finally:
for srv, srv_thread in servers:
srv.shutdown()
srv.server_close()
srv_thread.join()
@jelly
Copy link
Collaborator Author

jelly commented Nov 9, 2025

Note, the Makefile includes a check target which uses unittest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants