mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 03:56:01 +00:00
This commit is contained in:
parent
1a242c7daa
commit
5f562a185c
@ -51,13 +51,13 @@ flake8
|
|||||||
Run unit tests:
|
Run unit tests:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
py.test
|
pytest
|
||||||
```
|
```
|
||||||
|
|
||||||
Run unit and functional tests (requires docker):
|
Run unit and functional tests (requires docker):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
py.test --enable-functional
|
pytest --enable-functional
|
||||||
```
|
```
|
||||||
|
|
||||||
For sending package to pypi:
|
For sending package to pypi:
|
||||||
@ -89,4 +89,4 @@ Assuming you have the prerequisites:
|
|||||||
1. Open command palette (CMD+SHIFT+P (mac) or CTRL+SHIFT+P (windows))
|
1. Open command palette (CMD+SHIFT+P (mac) or CTRL+SHIFT+P (windows))
|
||||||
1. Select `Remote-Containers: Reopen in Container`.
|
1. Select `Remote-Containers: Reopen in Container`.
|
||||||
1. Container will be built, install all pip requirements and your VSCode will mount into it automagically.
|
1. Container will be built, install all pip requirements and your VSCode will mount into it automagically.
|
||||||
1. Your VSCode and container now essentially become a throw away environment.
|
1. Your VSCode and container now essentially become a throw away environment.
|
||||||
|
@ -333,7 +333,7 @@ following rules are enabled by default:
|
|||||||
* `systemctl` – correctly orders parameters of confusing `systemctl`;
|
* `systemctl` – correctly orders parameters of confusing `systemctl`;
|
||||||
* `terraform_init.py` – run `terraform init` before plan or apply;
|
* `terraform_init.py` – run `terraform init` before plan or apply;
|
||||||
* `terraform_no_command.py` – fixes unrecognized `terraform` commands;
|
* `terraform_no_command.py` – fixes unrecognized `terraform` commands;
|
||||||
* `test.py` – runs `py.test` instead of `test.py`;
|
* `test.py` – runs `pytest` instead of `test.py`;
|
||||||
* `touch` – creates missing directories before "touching";
|
* `touch` – creates missing directories before "touching";
|
||||||
* `tsuru_login` – runs `tsuru login` if not authenticated or session expired;
|
* `tsuru_login` – runs `tsuru login` if not authenticated or session expired;
|
||||||
* `tsuru_not_command` – fixes wrong `tsuru` commands like `tsuru shell`;
|
* `tsuru_not_command` – fixes wrong `tsuru` commands like `tsuru shell`;
|
||||||
|
@ -157,7 +157,7 @@ ReferenceError: conole is not defined
|
|||||||
./tests/rules/test_whois.py:22:80: E501 line too long (83 > 79 characters)
|
./tests/rules/test_whois.py:22:80: E501 line too long (83 > 79 characters)
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
FixFileTest('py.test', '/home/thefuck/tests/rules/test_fix_file.py', 218, None, """
|
FixFileTest('pytest', '/home/thefuck/tests/rules/test_fix_file.py', 218, None, """
|
||||||
monkeypatch = <_pytest.monkeypatch.monkeypatch object at 0x7fdb76a25b38>
|
monkeypatch = <_pytest.monkeypatch.monkeypatch object at 0x7fdb76a25b38>
|
||||||
test = ('fish a.sh', '/tmp/fix-error/a.sh', 2, None, '', "\\nfish: Unknown command 'foo'\\n/tmp/fix-error/a.sh (line 2): foo\\n ^\\n")
|
test = ('fish a.sh', '/tmp/fix-error/a.sh', 2, None, '', "\\nfish: Unknown command 'foo'\\n/tmp/fix-error/a.sh (line 2): foo\\n ^\\n")
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ class TestGetValidHistoryWithoutCurrent(object):
|
|||||||
def history(self, mocker):
|
def history(self, mocker):
|
||||||
mock = mocker.patch('thefuck.shells.shell.get_history')
|
mock = mocker.patch('thefuck.shells.shell.get_history')
|
||||||
# Passing as an argument causes `UnicodeDecodeError`
|
# Passing as an argument causes `UnicodeDecodeError`
|
||||||
# with newer py.test and python 2.7
|
# with newer pytest and python 2.7
|
||||||
mock.return_value = ['le cat', 'fuck', 'ls cat',
|
mock.return_value = ['le cat', 'fuck', 'ls cat',
|
||||||
'diff x', 'nocommand x', u'café ô']
|
'diff x', 'nocommand x', u'café ô']
|
||||||
return mock
|
return mock
|
||||||
|
@ -3,7 +3,7 @@ def match(command):
|
|||||||
|
|
||||||
|
|
||||||
def get_new_command(command):
|
def get_new_command(command):
|
||||||
return 'py.test'
|
return 'pytest'
|
||||||
|
|
||||||
|
|
||||||
# make it come before the python_command rule
|
# make it come before the python_command rule
|
||||||
|
Loading…
Reference in New Issue
Block a user