From 5f562a185ce3ca398f990b392c54d82104a105a7 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 23 Nov 2021 15:45:46 +0200 Subject: [PATCH] Drop the dot https://twitter.com/pytestdotorg/status/753767547866972160 --- CONTRIBUTING.md | 6 +++--- README.md | 2 +- tests/rules/test_fix_file.py | 2 +- tests/test_utils.py | 2 +- thefuck/rules/test.py.py | 2 +- tox.ini | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0e652530..cfccd47f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,13 +51,13 @@ flake8 Run unit tests: ```bash -py.test +pytest ``` Run unit and functional tests (requires docker): ```bash -py.test --enable-functional +pytest --enable-functional ``` 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. Select `Remote-Containers: Reopen in Container`. 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. \ No newline at end of file +1. Your VSCode and container now essentially become a throw away environment. diff --git a/README.md b/README.md index 3ea406fc..aa181c32 100644 --- a/README.md +++ b/README.md @@ -333,7 +333,7 @@ following rules are enabled by default: * `systemctl` – correctly orders parameters of confusing `systemctl`; * `terraform_init.py` – run `terraform init` before plan or apply; * `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"; * `tsuru_login` – runs `tsuru login` if not authenticated or session expired; * `tsuru_not_command` – fixes wrong `tsuru` commands like `tsuru shell`; diff --git a/tests/rules/test_fix_file.py b/tests/rules/test_fix_file.py index caeb1c6b..909e8ed7 100644 --- a/tests/rules/test_fix_file.py +++ b/tests/rules/test_fix_file.py @@ -157,7 +157,7 @@ ReferenceError: conole is not defined ./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> 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") diff --git a/tests/test_utils.py b/tests/test_utils.py index eae743f5..95f92bcb 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -245,7 +245,7 @@ class TestGetValidHistoryWithoutCurrent(object): def history(self, mocker): mock = mocker.patch('thefuck.shells.shell.get_history') # 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', 'diff x', 'nocommand x', u'café ô'] return mock diff --git a/thefuck/rules/test.py.py b/thefuck/rules/test.py.py index b898db52..47406b89 100644 --- a/thefuck/rules/test.py.py +++ b/thefuck/rules/test.py.py @@ -3,7 +3,7 @@ def match(command): def get_new_command(command): - return 'py.test' + return 'pytest' # make it come before the python_command rule diff --git a/tox.ini b/tox.ini index 3a68f787..991512d8 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = py27,py35,py36,py37,py38,py39,py310 [testenv] deps = -rrequirements.txt -commands = py.test -v --capture=sys +commands = pytest -v --capture=sys [flake8] ignore = E501,W503,W504