daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Feb 11th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import os.path
  2.  
  3. import pytest
  4. from compose.cli.main import TopLevelCommand, project_from_options
  5.  
  6. @pytest.fixture(scope="session")
  7. def docker_compose(request):
  8.     """
  9.    :type request: _pytest.python.FixtureRequest
  10.    """
  11.  
  12.     options = {"--no-deps": False,
  13.                "--abort-on-container-exit": False,
  14.                "SERVICE": "",
  15.                "--remove-orphans": False,
  16.                "--no-recreate": True,
  17.                "--force-recreate": False,
  18.                "--build": False,
  19.                '--no-build': False,
  20.                '--no-color': False,
  21.                "--rmi": "none",
  22.                "--volumes": "",
  23.                "--follow": False,
  24.                "--timestamps": False,
  25.                "--tail": "all",
  26.                "-d": True,
  27.                }
  28.  
  29.     project = project_from_options(os.path.dirname(__file__), options)
  30.     cmd = TopLevelCommand(project)
  31.     cmd.up(options)
  32.  
  33.     def fin():
  34.         cmd.logs(options)
  35.         cmd.down(options)
  36.  
  37.     request.addfinalizer(fin)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top