diff --git a/tests/functional/test_fish.py b/tests/functional/test_fish.py index c857e165..766c9e8f 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, functional, images, bare +from tests.functional.utils import spawn, images, bare, enabled containers = images(('ubuntu-python3-fish', u''' FROM ubuntu:latest @@ -18,9 +18,8 @@ RUN pip2 install -U pip setuptools ''')) -@functional @pytest.mark.skipif( - bare, 'https://github.com/travis-ci/apt-source-whitelist/issues/71') + bare or not enabled, '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: @@ -29,9 +28,8 @@ def test_with_confirmation(tag, dockerfile): with_confirmation(proc) -@functional @pytest.mark.skipif( - bare, 'https://github.com/travis-ci/apt-source-whitelist/issues/71') + bare or not enabled, '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: @@ -40,9 +38,8 @@ def test_refuse_with_confirmation(tag, dockerfile): refuse_with_confirmation(proc) -@functional @pytest.mark.skipif( - bare, 'https://github.com/travis-ci/apt-source-whitelist/issues/71') + bare or not enabled, '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 e5457f73..1650ab0b 100644 --- a/tests/functional/utils.py +++ b/tests/functional/utils.py @@ -10,6 +10,7 @@ import pytest root = str(Path(__file__).parent.parent.parent.resolve()) bare = os.environ.get('BARE') +enabled = os.environ.get('FUNCTIONAL') def build_container(tag, dockerfile): @@ -49,5 +50,5 @@ def images(*items): functional = pytest.mark.skipif( - not os.environ.get('FUNCTIONAL'), + not enabled, reason='Functional tests are disabled by default.')