mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-18 03:02:34 +01:00
Revert "#N/A Run functional tests in travis-ci"
This reverts commit c6ec2df85b
.
This commit is contained in:
@@ -9,16 +9,15 @@ import pexpect
|
||||
import pytest
|
||||
|
||||
root = str(Path(__file__).parent.parent.parent.resolve())
|
||||
docker = os.environ.get('DOCKER', 'docker')
|
||||
docker = os.environ.get('DOCKER', 'docker').split(' ')
|
||||
|
||||
|
||||
def build_container(tag, dockerfile):
|
||||
tmpdir = mkdtemp()
|
||||
with Path(tmpdir).joinpath('Dockerfile').open('w') as file:
|
||||
file.write(dockerfile)
|
||||
if subprocess.call(
|
||||
docker.split(' ') + ['build', '--tag={}'.format(tag), tmpdir],
|
||||
cwd=root) != 0:
|
||||
if subprocess.call(['docker', 'build', '--tag={}'.format(tag), tmpdir],
|
||||
cwd=root) != 0:
|
||||
raise Exception("Can't build a container")
|
||||
shutil.rmtree(tmpdir)
|
||||
|
||||
@@ -28,8 +27,7 @@ def spawn(tag, dockerfile):
|
||||
tag = 'thefuck/{}'.format(tag)
|
||||
build_container(tag, dockerfile)
|
||||
proc = pexpect.spawnu(
|
||||
'{} run --volume {}:/src --tty=true --interactive=true {}'.format(
|
||||
docker, root, tag))
|
||||
'docker run --volume {}:/src --tty=true --interactive=true {}'.format(root, tag))
|
||||
proc.logfile = sys.stdout
|
||||
proc.sendline('pip install /src')
|
||||
|
||||
|
Reference in New Issue
Block a user