Closed pipermerriam closed 5 years ago
server_driver = compose_driver(
connect_until_connected_to(client_config),
wait_for(SomeEvent).add_handler(lambda ev: assert isinstance(ev, SomeEvent)),
)
client_driver = compose_driver(
connect_to_endpoint(server_config),
broadcast(SomeEvent()),
)
Then there's probably a backend type component for how to run each endpoint type as well as something to manage doing things in their own processes.
Done with #141 opening new issues to convert the rest of the test suite to use this...
What was wrong?
trio
andasyncio
based test suites.How can it be fixed?
I've been imagining this concept that I'll call an "Endpoint Driver". It would be a declarative, implementation agnostic mechanism for defining a sequential set of actions that should be taken on an endpoint, with one of those actions being something like just running python code.
This tool should allow us to write implementation agnostic tests allowing us to define our test suite once and run it across any number of different combinations like:
I suspect the tests will be much more readable too.