Skip to content

Commit e4ab159

Browse files
committed
Added with_envs function to set multiple variables via keyword args.
1 parent e9e40f9 commit e4ab159

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/testcontainers/core/container.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ def with_env(self, key: str, value: str) -> Self:
5959
self.env[key] = value
6060
return self
6161

62+
def with_envs(self, **variables: str) -> Self:
63+
self.env.update(variables)
64+
return self
65+
6266
def with_env_file(self, env_file: Union[str, PathLike]) -> Self:
6367
env_values = dotenv_values(env_file)
6468
for key, value in env_values.items():

0 commit comments

Comments
 (0)