Skip to content

Commit

Permalink
adding test_docker_utils to test framework
Browse files Browse the repository at this point in the history
  • Loading branch information
lockefox committed Apr 12, 2018
1 parent f77023b commit 8b0bb4b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_docker_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""who tests the tester's tests?"""
import pytest
import _pytest.outcomes

import prosper.common.test_helpers as p_helpers
import prosper.common.exceptions as exceptions

def test_assert_docker_regular():
"""make sure p_helpers.assert_docker() raises expected error"""
p_helpers.DOCKER_OK = False
with pytest.raises(exceptions.DockerNotFound):
p_helpers.assert_docker()

def test_assert_docker_xfail():
"""make sure p_helpers.assert_docker() raises xfail in mode"""
p_helpers.DOCKER_OK = False
with pytest.raises(_pytest.outcomes.XFailed):
p_helpers.assert_docker(xfail=True)

0 comments on commit 8b0bb4b

Please sign in to comment.