Skip to content

Instantly share code, notes, and snippets.

@mrtyler
Created February 10, 2017 19:47
Show Gist options
  • Save mrtyler/5cc9f5260f5585b64dd59cb04991d051 to your computer and use it in GitHub Desktop.
Save mrtyler/5cc9f5260f5585b64dd59cb04991d051 to your computer and use it in GitHub Desktop.
$ virtualenv ../venv-double-jeopardy
New python executable in /Users/tyler/rtf/venv-double-jeopardy/bin/python
Installing setuptools, pip, wheel...done.
$ . ../venv-double-jeopardy/bin/activate
(venv-double-jeopardy) $ cat > requirements.txt
docker-py
flake8
molecule
(venv-double-jeopardy) $ pip install -r requirements.txt
Collecting docker-py (from -r requirements.txt (line 1))
Using cached docker_py-1.10.6-py2.py3-none-any.whl
Collecting flake8 (from -r requirements.txt (line 2))
Using cached flake8-3.3.0-py2.py3-none-any.whl
Collecting molecule (from -r requirements.txt (line 3))
Using cached molecule-1.20.0-py2-none-any.whl
[...]
(venv-double-jeopardy) $ molecule init --role double-jeopardy --driver docker
--> Initializing role double-jeopardy...
Successfully initialized new role in /Users/tyler/rtf/roles/double-jeopardy.
(venv-double-jeopardy) $ cd double-jeopardy/
(venv-double-jeopardy) $ molecule --debug test
[...]
--> Executing testinfra tests found in tests/...
DEBUG: COMMAND
/Users/tyler/rtf/roles/venv-double-jeopardy/bin/testinfra tests/test_default.py --debug --connection=docker
writing pytestdebug information to /Users/tyler/rtf/roles/double-jeopardy/pytestdebug.log
============================= test session starts ==============================
platform darwin -- Python 2.7.13, pytest-3.0.6, py-1.4.32, pluggy-0.4.0 -- /Users/tyler/rtf/roles/venv-double-jeopardy/bin/python
using: pytest-3.0.6 pylib-1.4.32
setuptools registered plugins:
testinfra-1.4.5 at /Users/tyler/rtf/roles/venv-double-jeopardy/lib/python2.7/site-packages/testinfra/plugin.py
rootdir: /Users/tyler/rtf/roles/double-jeopardy, inifile:
plugins: testinfra-1.4.5
collected 2 itemss
tests/test_default.py ..
============================ pytest-warning summary ============================
WP1 None Module already imported so can not be re-written: testinfra
================= 2 passed, 1 pytest-warnings in 1.49 seconds ==================
wrote pytestdebug information to /Users/tyler/rtf/roles/double-jeopardy/pytestdebug.log
--> Destroying instances...
Stopping container double-jeopardy...
Removed container double-jeopardy.
(venv-double-jeopardy) $ cat >> tests/test_default.py
def test_double_jeopardy():
assert False
(venv-double-jeopardy) $ molecule --debug test
[...]
--> Executing testinfra tests found in tests/...
DEBUG: COMMAND
/Users/tyler/rtf/roles/venv-double-jeopardy/bin/testinfra tests/test_default.py --debug --connection=docker
writing pytestdebug information to /Users/tyler/rtf/roles/double-jeopardy/pytestdebug.log
============================= test session starts ==============================
platform darwin -- Python 2.7.13, pytest-3.0.6, py-1.4.32, pluggy-0.4.0 -- /Users/tyler/rtf/roles/venv-double-jeopardy/bin/python
using: pytest-3.0.6 pylib-1.4.32
setuptools registered plugins:
testinfra-1.4.5 at /Users/tyler/rtf/roles/venv-double-jeopardy/lib/python2.7/site-packages/testinfra/plugin.py
rootdir: /Users/tyler/rtf/roles/double-jeopardy, inifile:
plugins: testinfra-1.4.5
collected 4 itemss
tests/test_default.py ..FF
=================================== FAILURES ===================================
_____________________________ test_double_jeopardy _____________________________
def test_double_jeopardy():
> assert False
E assert False
tests/test_default.py:16: AssertionError
_____________________________ test_double_jeopardy _____________________________
def test_double_jeopardy():
> assert False
E assert False
tests/test_default.py:16: AssertionError
============================ pytest-warning summary ============================
WP1 None Module already imported so can not be re-written: testinfra
============ 2 failed, 2 passed, 1 pytest-warnings in 1.54 seconds =============
wrote pytestdebug information to /Users/tyler/rtf/roles/double-jeopardy/pytestdebug.log
ERROR:
RAN: '/Users/tyler/rtf/roles/venv-double-jeopardy/bin/testinfra tests/test_default.py --debug --connection=docker'
STDOUT:
STDERR:
(venv-double-jeopardy) $ /Users/tyler/rtf/roles/venv-double-jeopardy/bin/testinfra tests/test_default.py --debug --connection=docker
writing pytestdebug information to /Users/tyler/rtf/roles/double-jeopardy/pytestdebug.log
============================================================================== test session starts ===============================================================================
platform darwin -- Python 2.7.13, pytest-3.0.6, py-1.4.32, pluggy-0.4.0 -- /Users/tyler/rtf/roles/venv-double-jeopardy/bin/python
using: pytest-3.0.6 pylib-1.4.32
setuptools registered plugins:
testinfra-1.4.5 at /Users/tyler/rtf/roles/venv-double-jeopardy/lib/python2.7/site-packages/testinfra/plugin.py
rootdir: /Users/tyler/rtf/roles/double-jeopardy, inifile:
plugins: testinfra-1.4.5
collected 2 items
tests/test_default.py .F
==================================================================================== FAILURES ====================================================================================
______________________________________________________________________________ test_double_jeopardy ______________________________________________________________________________
def test_double_jeopardy():
> assert False
E assert False
tests/test_default.py:16: AssertionError
============================================================================= pytest-warning summary =============================================================================
WP1 None Module already imported so can not be re-written: testinfra
============================================================= 1 failed, 1 passed, 1 pytest-warnings in 1.54 seconds ==============================================================
wrote pytestdebug information to /Users/tyler/rtf/roles/double-jeopardy/pytestdebug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment