testcontainers / testcontainers/testcontainers-python

Bug: DockerCompose.client_args not working

Open
#596 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.3k
Forks
386
Avg merge
4h 40m
Merged PRs (30d)
1

Description

Describe the bug

I was trying to pass client_args to the DockerCompose constructor. However, I get the error:

Traceback (most recent call last):
  File <removed>, in <module>
    test_foo()
  File <removed>, in test_foo
    compose = DockerCompose(
              ^^^^^^^^^^^^^^
TypeError: DockerCompose.__init__() got an unexpected keyword argument 'client_args'

I presume this is because it is in the doc string, but not the actual class definition.

To Reproduce

from testcontainers.compose import DockerCompose

compose = DockerCompose(
    client_args=True,
)

Runtime environment

testcontainers-python is 4.5.1 on Debian
Docker version 26.1.3-1, build b72abbb6f0351eb22e5c7bdbba9112fef6b41429
Docker Compose version v2.27.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the DockerCompose constructor and compare its accepted arguments with the documented client_args parameter. Reproduce the TypeError using the example; done means client_args is accepted by DockerCompose as documented and the relevant test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, python
Domain
devtools, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.