1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-11 22:34:01 +01:00

#1248: Reuse Docker images in functional tests

This commit is contained in:
Pablo Santiago Blum de Aguiar
2023-07-10 14:29:31 +02:00
parent d81929f294
commit 2cadcca904
7 changed files with 27 additions and 50 deletions

View File

@@ -2,23 +2,13 @@ import pytest
from tests.functional.plots import with_confirmation, without_confirmation, \
refuse_with_confirmation, select_command_with_arrows
containers = (('thefuck/python3-tcsh',
u'''FROM python:3
RUN apt-get update
RUN apt-get install -yy tcsh''',
u'tcsh'),
('thefuck/python2-tcsh',
u'''FROM python:2
RUN apt-get update
RUN apt-get install -yy tcsh''',
u'tcsh'))
containers = ((u'thefuck/python3', u'', u'tcsh'),
(u'thefuck/python2', u'', u'tcsh'))
@pytest.fixture(params=containers)
def proc(request, spawnu, TIMEOUT):
proc = spawnu(*request.param)
proc.sendline(u'pip install /src')
assert proc.expect([TIMEOUT, u'Successfully installed'])
proc.sendline(u'tcsh')
proc.sendline(u'setenv PYTHONIOENCODING utf8')
proc.sendline(u'eval `thefuck --alias`')