Skip to content

Commit

Permalink
changing the code to be compatible with python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
eliax1996 committed Oct 30, 2023
1 parent fcd6710 commit a31471c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 3 additions & 5 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,9 @@ def fixture_registry_async_client_custom_config(
) -> Callable[[ConfigDefaults], AsyncContextManager[Client]]:
@asynccontextmanager
async def client_from_custom_config(config: ConfigDefaults) -> Client:
async with (
registry_cluster_from_custom_config(config) as registry_description,
_registry_async_client(request, registry_description, loop) as client,
):
yield client
async with registry_cluster_from_custom_config(config) as registry_description:
async with _registry_async_client(request, registry_description, loop) as client:
yield client

return client_from_custom_config

Expand Down
9 changes: 8 additions & 1 deletion tests/integration/utils/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ async def start_schema_registry_cluster(
log_path = group_dir / f"{pos}.log"
error_path = group_dir / f"{pos}.error"

config = set_config_defaults(config) if custom_values is None else set_config_defaults(config) | custom_values
config = (
set_config_defaults(config)
if custom_values is None
else {
**dict(item for item in set_config_defaults(config).items() if item[0] not in custom_values),
**custom_values,
}
)
write_config(config_path, config)

logfile = stack.enter_context(open(log_path, "w"))
Expand Down

0 comments on commit a31471c

Please sign in to comment.