From 1eaead4f704d08e079fbffeb80d0cc43db02513f Mon Sep 17 00:00:00 2001 From: Vladimir Iakovlev Date: Wed, 21 Nov 2018 19:44:07 +0100 Subject: [PATCH] #N/A: Remove performance tests as they are meaningless with the current implementation --- tests/functional/test_performance.py | 45 ---------------------------- 1 file changed, 45 deletions(-) delete mode 100644 tests/functional/test_performance.py diff --git a/tests/functional/test_performance.py b/tests/functional/test_performance.py deleted file mode 100644 index b410114e..00000000 --- a/tests/functional/test_performance.py +++ /dev/null @@ -1,45 +0,0 @@ -import pytest -import time - -dockerfile = u''' -FROM python:3 -RUN adduser --disabled-password --gecos '' test -ENV SEED "{seed}" -WORKDIR /src -USER test -RUN echo 'eval $(thefuck --alias)' > /home/test/.bashrc -RUN echo > /home/test/.bash_history -RUN git config --global user.email "you@example.com" -RUN git config --global user.name "Your Name" -USER root -'''.format(seed=time.time()) - - -def plot(proc, TIMEOUT): - proc.sendline(u'cd /home/test/') - proc.sendline(u'fuck') - assert proc.expect([TIMEOUT, u'No fucks given']) - proc.sendline(u'git init') - proc.sendline(u'git add .') - proc.sendline(u'git commit -a -m init') - proc.sendline(u'git brnch') - proc.sendline(u'fuck') - assert proc.expect([TIMEOUT, u'git branch']) - proc.send('\n') - assert proc.expect([TIMEOUT, u'master']) - proc.sendline(u'echo test') - proc.sendline(u'echo tst') - proc.sendline(u'fuck') - assert proc.expect([TIMEOUT, u'echo test']) - proc.send('\n') - assert proc.expect([TIMEOUT, u'test']) - - -@pytest.mark.functional -@pytest.mark.benchmark(min_rounds=10) -def test_performance(spawnu, TIMEOUT, benchmark): - proc = spawnu(u'thefuck/python3-bash-performance', - dockerfile, u'bash') - proc.sendline(u'pip install /src') - proc.sendline(u'su test') - assert benchmark(plot, proc, TIMEOUT) is None