mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 07:04:12 +00:00 
			
		
		
		
	#356 Print useful information when fuck called and alias isn't configured
				
					
				
			This commit is contained in:
		| @@ -78,3 +78,9 @@ def without_confirmation(proc, TIMEOUT): | ||||
|     proc.sendline(u'fuck') | ||||
|     assert proc.expect([TIMEOUT, u'echo test']) | ||||
|     assert proc.expect([TIMEOUT, u'test']) | ||||
|  | ||||
|  | ||||
| def how_to_configure(proc, TIMEOUT): | ||||
|     proc.sendline(u'unalias fuck') | ||||
|     proc.sendline(u'fuck') | ||||
|     assert proc.expect([TIMEOUT, "alias isn't configured"]) | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| import pytest | ||||
| from tests.functional.plots import with_confirmation, without_confirmation, \ | ||||
|     refuse_with_confirmation, history_changed, history_not_changed, \ | ||||
|     select_command_with_arrows | ||||
|     select_command_with_arrows, how_to_configure | ||||
|  | ||||
| containers = ((u'thefuck/ubuntu-python3-bash', | ||||
|                u'''FROM ubuntu:latest | ||||
| @@ -55,3 +55,9 @@ def test_refuse_with_confirmation(proc, TIMEOUT): | ||||
| def test_without_confirmation(proc, TIMEOUT): | ||||
|     without_confirmation(proc, TIMEOUT) | ||||
|     history_changed(proc, TIMEOUT, u'echo test') | ||||
|  | ||||
|  | ||||
| @pytest.mark.functional | ||||
| @pytest.mark.once_without_docker | ||||
| def test_how_to_configure_alias(proc, TIMEOUT): | ||||
|     how_to_configure(proc, TIMEOUT) | ||||
|   | ||||
| @@ -1,8 +1,9 @@ | ||||
| import pytest | ||||
| from tests.functional.plots import with_confirmation, without_confirmation, \ | ||||
|     refuse_with_confirmation, history_changed, history_not_changed, select_command_with_arrows | ||||
|     refuse_with_confirmation, history_changed, history_not_changed, \ | ||||
|     select_command_with_arrows, how_to_configure | ||||
|  | ||||
| containers = (('ubuntu-python3-zsh', | ||||
| containers = (('thefuck/ubuntu-python3-zsh', | ||||
|                u'''FROM ubuntu:latest | ||||
|                    RUN apt-get update | ||||
|                    RUN apt-get install -yy python3 python3-pip python3-dev git | ||||
| @@ -10,7 +11,7 @@ containers = (('ubuntu-python3-zsh', | ||||
|                    RUN ln -s /usr/bin/pip3 /usr/bin/pip | ||||
|                    RUN apt-get install -yy zsh''', | ||||
|                u'zsh'), | ||||
|               ('ubuntu-python2-zsh', | ||||
|               ('thefuck/ubuntu-python2-zsh', | ||||
|                u'''FROM ubuntu:latest | ||||
|                    RUN apt-get update | ||||
|                    RUN apt-get install -yy python python-pip python-dev git | ||||
| @@ -59,3 +60,9 @@ def test_refuse_with_confirmation(proc, TIMEOUT): | ||||
| def test_without_confirmation(proc, TIMEOUT): | ||||
|     without_confirmation(proc, TIMEOUT) | ||||
|     history_changed(proc, TIMEOUT, u'echo test') | ||||
|  | ||||
|  | ||||
| @pytest.mark.functional | ||||
| @pytest.mark.once_without_docker | ||||
| def test_how_to_configure_alias(proc, TIMEOUT): | ||||
|     how_to_configure(proc, TIMEOUT) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user