From 08af616e3df27873bd411f21f9da1ce78d10f635 Mon Sep 17 00:00:00 2001 From: nvbn Date: Tue, 8 Sep 2015 17:39:52 +0300 Subject: [PATCH] #366 Add sleep before checking history --- tests/functional/plots.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/plots.py b/tests/functional/plots.py index fcbede63..2f102684 100644 --- a/tests/functional/plots.py +++ b/tests/functional/plots.py @@ -1,3 +1,6 @@ +from time import sleep + + def _set_confirmation(proc, require): proc.sendline(u'mkdir -p ~/.thefuck') proc.sendline( @@ -22,12 +25,14 @@ def with_confirmation(proc, TIMEOUT): def history_changed(proc, TIMEOUT, to): """Ensures that history changed.""" + sleep(1) proc.send('\033[A') assert proc.expect([TIMEOUT, to]) def history_not_changed(proc, TIMEOUT): """Ensures that history not changed.""" + sleep(1) proc.send('\033[A') assert proc.expect([TIMEOUT, u'fuck'])