def test_refuse_with_confirmation(tag, dockerfile): with spawn(tag, dockerfile, u'zsh') as proc: proc.sendline(u'eval $(thefuck-alias)') proc.sendline(u'export HISTFILE=~/.zsh_history') proc.sendline(u'touch $HISTFILE') refuse_with_confirmation(proc) history_not_changed(proc)
def test_installation(request, shell, tag, dockerfile): proc = spawn(request, tag, dockerfile, shell, install=False) proc.sendline(u'cat /src/install.sh | sh - && $0') proc.sendline(u'thefuck --version') assert proc.expect([TIMEOUT, u'The F**k'], timeout=600) proc.sendline(u'f**k') assert proc.expect([TIMEOUT, u'No f***s given'])
def proc(request): tag, dockerfile = request.param proc = spawn(request, tag, dockerfile, u'bash') proc.sendline(u"export PS1='$ '") proc.sendline(u'eval $(thefuck-alias)') proc.sendline(u'echo > $HISTFILE') return proc
def test_without_confirmation(tag, dockerfile): with spawn(tag, dockerfile, u'bash') as proc: proc.sendline(u"export PS1='$ '") proc.sendline(u'eval $(thefuck-alias)') proc.sendline(u'touch $HISTFILE') without_confirmation(proc) history_changed(proc)
def proc(request): tag, dockerfile = request.param proc = spawn(request, tag, dockerfile, u'zsh') proc.sendline(u'eval $(thefuck-alias)') proc.sendline(u'export HISTFILE=~/.zsh_history') proc.sendline(u'echo > $HISTFILE') proc.sendline(u'export SAVEHIST=100') proc.sendline(u'export HISTSIZE=100') proc.sendline(u'setopt INC_APPEND_HISTORY') return proc
def test_without_confirmation(tag, dockerfile): with spawn(tag, dockerfile) as proc: proc.sendline('export THEFUCK_REQUIRE_CONFIRMATION=false') proc.sendline('eval $(thefuck-alias)') without_confirmation(proc)
def test_with_confirmation(tag, dockerfile): with spawn(tag, dockerfile) as proc: proc.sendline('eval $(thefuck-alias)') with_confirmation(proc)
def test_refuse_with_confirmation(tag, dockerfile): with spawn(tag, dockerfile, u'zsh') as proc: proc.sendline(u'eval $(thefuck-alias)') refuse_with_confirmation(proc)
def proc(request): tag, dockerfile = request.param proc = spawn(request, tag, dockerfile, u'tcsh') proc.sendline(u'tcsh') proc.sendline(u'eval `thefuck-alias`') return proc
def test_without_confirmation(tag, dockerfile): with spawn(tag, dockerfile, u'fish') as proc: proc.sendline(u'thefuck-alias > ~/.config/fish/config.fish') proc.sendline(u'fish') without_confirmation(proc)
def proc(request): tag, dockerfile = request.param proc = spawn(request, tag, dockerfile, u'fish') proc.sendline(u'thefuck-alias > ~/.config/fish/config.fish') proc.sendline(u'fish') return proc
def proc(request): return spawn(request, 'ubuntu-python3-bash-performance', dockerfile, u'bash', install=False, copy_src=True)
def proc(request): tag, dockerfile = request.param proc = spawn(request, tag, dockerfile, u'fish') proc.sendline(u'thefuck --alias > ~/.config/fish/config.fish') proc.sendline(u'fish') return proc
def test_without_confirmation(tag, dockerfile): with spawn(tag, dockerfile, u'tcsh') as proc: proc.sendline(u'tcsh') proc.sendline(u'eval `thefuck-alias`') without_confirmation(proc)