You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I am writing tests using the new testing framework formerly known as scenario, I find myself adding a line like this:
withctx(ctx.on.start(), state_in) asmanager:
charm=cast(KafkaCharm, manager.charm) # <-- This line...assertnotcharm.broker.healthy# <-- ...gives me autocomplete and type checker validation
In larger code bases, this boilerplate adds up to numerous lines.
With a few tweaks to Context and Manager, we can make them variadic types and get this nice user experience:
If that's something you are interested in, I can open a PR. Have a look at my branch on ops-scenario, and let me know what you think!
The text was updated successfully, but these errors were encountered:
Hi,
When I am writing tests using the new testing framework formerly known as scenario, I find myself adding a line like this:
In larger code bases, this boilerplate adds up to numerous lines.
With a few tweaks to
Context
andManager
, we can make them variadic types and get this nice user experience:If that's something you are interested in, I can open a PR. Have a look at my branch on ops-scenario, and let me know what you think!
The text was updated successfully, but these errors were encountered: