mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-21 20:38:54 +00:00
Use only one skipif
This commit is contained in:
parent
129d67f794
commit
2291a5ba5d
@ -1,7 +1,7 @@
|
|||||||
import pytest
|
import pytest
|
||||||
from tests.functional.plots import with_confirmation, without_confirmation, \
|
from tests.functional.plots import with_confirmation, without_confirmation, \
|
||||||
refuse_with_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'''
|
containers = images(('ubuntu-python3-fish', u'''
|
||||||
FROM ubuntu:latest
|
FROM ubuntu:latest
|
||||||
@ -18,9 +18,8 @@ RUN pip2 install -U pip setuptools
|
|||||||
'''))
|
'''))
|
||||||
|
|
||||||
|
|
||||||
@functional
|
|
||||||
@pytest.mark.skipif(
|
@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)
|
@pytest.mark.parametrize('tag, dockerfile', containers)
|
||||||
def test_with_confirmation(tag, dockerfile):
|
def test_with_confirmation(tag, dockerfile):
|
||||||
with spawn(tag, dockerfile, u'fish') as proc:
|
with spawn(tag, dockerfile, u'fish') as proc:
|
||||||
@ -29,9 +28,8 @@ def test_with_confirmation(tag, dockerfile):
|
|||||||
with_confirmation(proc)
|
with_confirmation(proc)
|
||||||
|
|
||||||
|
|
||||||
@functional
|
|
||||||
@pytest.mark.skipif(
|
@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)
|
@pytest.mark.parametrize('tag, dockerfile', containers)
|
||||||
def test_refuse_with_confirmation(tag, dockerfile):
|
def test_refuse_with_confirmation(tag, dockerfile):
|
||||||
with spawn(tag, dockerfile, u'fish') as proc:
|
with spawn(tag, dockerfile, u'fish') as proc:
|
||||||
@ -40,9 +38,8 @@ def test_refuse_with_confirmation(tag, dockerfile):
|
|||||||
refuse_with_confirmation(proc)
|
refuse_with_confirmation(proc)
|
||||||
|
|
||||||
|
|
||||||
@functional
|
|
||||||
@pytest.mark.skipif(
|
@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)
|
@pytest.mark.parametrize('tag, dockerfile', containers)
|
||||||
def test_without_confirmation(tag, dockerfile):
|
def test_without_confirmation(tag, dockerfile):
|
||||||
with spawn(tag, dockerfile, u'fish') as proc:
|
with spawn(tag, dockerfile, u'fish') as proc:
|
||||||
|
@ -10,6 +10,7 @@ import pytest
|
|||||||
|
|
||||||
root = str(Path(__file__).parent.parent.parent.resolve())
|
root = str(Path(__file__).parent.parent.parent.resolve())
|
||||||
bare = os.environ.get('BARE')
|
bare = os.environ.get('BARE')
|
||||||
|
enabled = os.environ.get('FUNCTIONAL')
|
||||||
|
|
||||||
|
|
||||||
def build_container(tag, dockerfile):
|
def build_container(tag, dockerfile):
|
||||||
@ -49,5 +50,5 @@ def images(*items):
|
|||||||
|
|
||||||
|
|
||||||
functional = pytest.mark.skipif(
|
functional = pytest.mark.skipif(
|
||||||
not os.environ.get('FUNCTIONAL'),
|
not enabled,
|
||||||
reason='Functional tests are disabled by default.')
|
reason='Functional tests are disabled by default.')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user