Merge branch 'main' into main
This commit is contained in:
commit
b957477475
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: "v0.4.7"
|
rev: "v0.4.8"
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: ["--fix"]
|
args: ["--fix"]
|
||||||
|
@ -44,7 +44,7 @@ repos:
|
||||||
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
|
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
|
||||||
additional_dependencies: ["tox>=4.9"]
|
additional_dependencies: ["tox>=4.9"]
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v3.15.2
|
rev: v3.16.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
stages: [manual]
|
stages: [manual]
|
||||||
|
|
|
@ -221,9 +221,9 @@ class Cache:
|
||||||
os.umask(umask)
|
os.umask(umask)
|
||||||
path.chmod(0o777 - umask)
|
path.chmod(0o777 - umask)
|
||||||
|
|
||||||
with open(path.joinpath("README.md"), "xt", encoding="UTF-8") as f:
|
with open(path.joinpath("README.md"), "x", encoding="UTF-8") as f:
|
||||||
f.write(README_CONTENT)
|
f.write(README_CONTENT)
|
||||||
with open(path.joinpath(".gitignore"), "xt", encoding="UTF-8") as f:
|
with open(path.joinpath(".gitignore"), "x", encoding="UTF-8") as f:
|
||||||
f.write("# Created by pytest automatically.\n*\n")
|
f.write("# Created by pytest automatically.\n*\n")
|
||||||
with open(path.joinpath("CACHEDIR.TAG"), "xb") as f:
|
with open(path.joinpath("CACHEDIR.TAG"), "xb") as f:
|
||||||
f.write(CACHEDIR_TAG_CONTENT)
|
f.write(CACHEDIR_TAG_CONTENT)
|
||||||
|
|
|
@ -983,6 +983,7 @@ def capsys(request: SubRequest) -> Generator[CaptureFixture[str], None, None]:
|
||||||
Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.
|
Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def test_output(capsys):
|
def test_output(capsys):
|
||||||
|
@ -1010,6 +1011,7 @@ def capsysbinary(request: SubRequest) -> Generator[CaptureFixture[bytes], None,
|
||||||
Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.
|
Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def test_output(capsysbinary):
|
def test_output(capsysbinary):
|
||||||
|
@ -1037,6 +1039,7 @@ def capfd(request: SubRequest) -> Generator[CaptureFixture[str], None, None]:
|
||||||
Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.
|
Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def test_system_echo(capfd):
|
def test_system_echo(capfd):
|
||||||
|
@ -1064,6 +1067,7 @@ def capfdbinary(request: SubRequest) -> Generator[CaptureFixture[bytes], None, N
|
||||||
Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.
|
Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def test_system_echo(capfdbinary):
|
def test_system_echo(capfdbinary):
|
||||||
|
|
|
@ -1735,6 +1735,7 @@ class Config:
|
||||||
can be used to explicitly use the global verbosity level.
|
can be used to explicitly use the global verbosity level.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
# content of pytest.ini
|
# content of pytest.ini
|
||||||
|
|
|
@ -142,6 +142,7 @@ class MonkeyPatch:
|
||||||
which undoes any patching done inside the ``with`` block upon exit.
|
which undoes any patching done inside the ``with`` block upon exit.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
|
|
|
@ -805,6 +805,7 @@ class Pytester:
|
||||||
The first created file.
|
The first created file.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
pytester.makefile(".txt", "line1", "line2")
|
pytester.makefile(".txt", "line1", "line2")
|
||||||
|
@ -858,6 +859,7 @@ class Pytester:
|
||||||
existing files.
|
existing files.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def test_something(pytester):
|
def test_something(pytester):
|
||||||
|
@ -877,6 +879,7 @@ class Pytester:
|
||||||
existing files.
|
existing files.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def test_something(pytester):
|
def test_something(pytester):
|
||||||
|
|
Loading…
Reference in New Issue