From b2457d1587620dc6e05a9da1feb152b5fe96c997 Mon Sep 17 00:00:00 2001 From: nvbn Date: Sat, 25 Jul 2015 03:35:55 +0300 Subject: [PATCH] Fix skipif on fish tests --- tests/functional/test_fish.py | 11 +++++++---- tests/functional/utils.py | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_fish.py b/tests/functional/test_fish.py index 766c9e8f..e35b06c7 100644 --- a/tests/functional/test_fish.py +++ b/tests/functional/test_fish.py @@ -1,7 +1,7 @@ import pytest from tests.functional.plots import with_confirmation, without_confirmation, \ refuse_with_confirmation -from tests.functional.utils import spawn, images, bare, enabled +from tests.functional.utils import spawn, functional, images, bare containers = images(('ubuntu-python3-fish', u''' FROM ubuntu:latest @@ -18,8 +18,9 @@ RUN pip2 install -U pip setuptools ''')) +@functional @pytest.mark.skipif( - bare or not enabled, 'https://github.com/travis-ci/apt-source-whitelist/issues/71') + bare, reason='https://github.com/travis-ci/apt-source-whitelist/issues/71') @pytest.mark.parametrize('tag, dockerfile', containers) def test_with_confirmation(tag, dockerfile): with spawn(tag, dockerfile, u'fish') as proc: @@ -28,8 +29,9 @@ def test_with_confirmation(tag, dockerfile): with_confirmation(proc) +@functional @pytest.mark.skipif( - bare or not enabled, 'https://github.com/travis-ci/apt-source-whitelist/issues/71') + bare, reason='https://github.com/travis-ci/apt-source-whitelist/issues/71') @pytest.mark.parametrize('tag, dockerfile', containers) def test_refuse_with_confirmation(tag, dockerfile): with spawn(tag, dockerfile, u'fish') as proc: @@ -38,8 +40,9 @@ def test_refuse_with_confirmation(tag, dockerfile): refuse_with_confirmation(proc) +@functional @pytest.mark.skipif( - bare or not enabled, 'https://github.com/travis-ci/apt-source-whitelist/issues/71') + bare, reason='https://github.com/travis-ci/apt-source-whitelist/issues/71') @pytest.mark.parametrize('tag, dockerfile', containers) def test_without_confirmation(tag, dockerfile): with spawn(tag, dockerfile, u'fish') as proc: diff --git a/tests/functional/utils.py b/tests/functional/utils.py index 1650ab0b..5277c7e6 100644 --- a/tests/functional/utils.py +++ b/tests/functional/utils.py @@ -25,6 +25,7 @@ def build_container(tag, dockerfile): @contextmanager def spawn(tag, dockerfile, cmd): + raise Exception([bare, enabled]) if bare: proc = pexpect.spawnu(cmd) else: