Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker_compose_subprocess_kwargs fixture support #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Toilal
Copy link

@Toilal Toilal commented Jan 29, 2019

This allow custom options be passed to underlying subprocess.check_output invocations, like cwd.

@pytest.fixture(scope='session')
def docker_compose_subprocess_kwargs():
return {'cwd': '..'}

This allow custom options be passed to underlying subprocess.check_output invocations, like cwd.

@pytest.fixture(scope='session')
def docker_compose_subprocess_kwargs():
    return {'cwd': '..'}
@butla
Copy link

butla commented Jan 29, 2019

Can you justify why do you need this?

@Toilal
Copy link
Author

Toilal commented Jan 29, 2019

Python sources are lying in a src subdirectory, so pytest runs from this directory. but docker-compose.yml and .env file are in the root directory of the repository, so I need to pass cwd parameter to execute docker-compose (cwd='..').

https://github.com/GIP-Recia/ESCOSynchroMoodle

@butla
Copy link

butla commented Jan 29, 2019

Ok.

As I don't know when this'll be merged, maybe you can work around it by overwriting docker_compose_file and maybe changing the paths in your compose files?

@Toilal
Copy link
Author

Toilal commented Jan 29, 2019

Thx. I actually use a fork installed with pip right from github, with both submitted pull requests.

@augi
Copy link
Member

augi commented Jan 25, 2024

May I ask you to resolve the conflicts? 🙏 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants