mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-31 02:01:13 +00:00
Fix skipif on fish tests
This commit is contained in:
parent
2291a5ba5d
commit
b2457d1587
@ -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, images, bare, enabled
|
from tests.functional.utils import spawn, functional, images, bare
|
||||||
|
|
||||||
containers = images(('ubuntu-python3-fish', u'''
|
containers = images(('ubuntu-python3-fish', u'''
|
||||||
FROM ubuntu:latest
|
FROM ubuntu:latest
|
||||||
@ -18,8 +18,9 @@ RUN pip2 install -U pip setuptools
|
|||||||
'''))
|
'''))
|
||||||
|
|
||||||
|
|
||||||
|
@functional
|
||||||
@pytest.mark.skipif(
|
@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)
|
@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:
|
||||||
@ -28,8 +29,9 @@ def test_with_confirmation(tag, dockerfile):
|
|||||||
with_confirmation(proc)
|
with_confirmation(proc)
|
||||||
|
|
||||||
|
|
||||||
|
@functional
|
||||||
@pytest.mark.skipif(
|
@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)
|
@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:
|
||||||
@ -38,8 +40,9 @@ def test_refuse_with_confirmation(tag, dockerfile):
|
|||||||
refuse_with_confirmation(proc)
|
refuse_with_confirmation(proc)
|
||||||
|
|
||||||
|
|
||||||
|
@functional
|
||||||
@pytest.mark.skipif(
|
@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)
|
@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:
|
||||||
|
@ -25,6 +25,7 @@ def build_container(tag, dockerfile):
|
|||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def spawn(tag, dockerfile, cmd):
|
def spawn(tag, dockerfile, cmd):
|
||||||
|
raise Exception([bare, enabled])
|
||||||
if bare:
|
if bare:
|
||||||
proc = pexpect.spawnu(cmd)
|
proc = pexpect.spawnu(cmd)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user