-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding test_docker_utils to test framework
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |