mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-27 02:09:13 +00:00
chore(deps): update pre-commit hooks (#4605)
* chore(deps): update pre-commit hooks updates: - [github.com/psf/black: 23.1.0 → 23.3.0](https://github.com/psf/black/compare/23.1.0...23.3.0) - [github.com/Lucas-C/pre-commit-hooks: v1.4.2 → v1.5.1](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.4.2...v1.5.1) - [github.com/charliermarsh/ruff-pre-commit: v0.0.254 → v0.0.260](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.254...v0.0.260) - [github.com/PyCQA/pylint: v2.16.4 → v3.0.0a6](https://github.com/PyCQA/pylint/compare/v2.16.4...v3.0.0a6) - [github.com/pre-commit/mirrors-mypy: v1.0.1 → v1.1.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.0.1...v1.1.1) - [github.com/codespell-project/codespell: v2.2.2 → v2.2.4](https://github.com/codespell-project/codespell/compare/v2.2.2...v2.2.4) - [github.com/pre-commit/mirrors-clang-format: v15.0.7 → v16.0.0](https://github.com/pre-commit/mirrors-clang-format/compare/v15.0.7...v16.0.0) * style: pre-commit fixes * style: fix issues * Update tests/test_call_policies.py * Update tests/test_call_policies.py * fix: ignore code in file * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
committed by
GitHub
parent
3f366ff888
commit
5e946c2fa5
@@ -9,16 +9,16 @@ def test_captured(capsys):
|
||||
m.captured_output(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
m.captured_err(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == ""
|
||||
assert not stdout
|
||||
assert stderr == msg
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ def test_captured_large_string(capsys):
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_captured_utf8_2byte_offset0(capsys):
|
||||
@@ -40,7 +40,7 @@ def test_captured_utf8_2byte_offset0(capsys):
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_captured_utf8_2byte_offset1(capsys):
|
||||
@@ -50,7 +50,7 @@ def test_captured_utf8_2byte_offset1(capsys):
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_captured_utf8_3byte_offset0(capsys):
|
||||
@@ -60,7 +60,7 @@ def test_captured_utf8_3byte_offset0(capsys):
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_captured_utf8_3byte_offset1(capsys):
|
||||
@@ -70,7 +70,7 @@ def test_captured_utf8_3byte_offset1(capsys):
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_captured_utf8_3byte_offset2(capsys):
|
||||
@@ -80,7 +80,7 @@ def test_captured_utf8_3byte_offset2(capsys):
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_captured_utf8_4byte_offset0(capsys):
|
||||
@@ -90,7 +90,7 @@ def test_captured_utf8_4byte_offset0(capsys):
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_captured_utf8_4byte_offset1(capsys):
|
||||
@@ -100,7 +100,7 @@ def test_captured_utf8_4byte_offset1(capsys):
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_captured_utf8_4byte_offset2(capsys):
|
||||
@@ -110,7 +110,7 @@ def test_captured_utf8_4byte_offset2(capsys):
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_captured_utf8_4byte_offset3(capsys):
|
||||
@@ -120,7 +120,7 @@ def test_captured_utf8_4byte_offset3(capsys):
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_guard_capture(capsys):
|
||||
@@ -128,7 +128,7 @@ def test_guard_capture(capsys):
|
||||
m.guard_output(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
|
||||
|
||||
def test_series_captured(capture):
|
||||
@@ -145,7 +145,7 @@ def test_flush(capfd):
|
||||
with m.ostream_redirect():
|
||||
m.noisy_function(msg, flush=False)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
assert stdout == ""
|
||||
assert not stdout
|
||||
|
||||
m.noisy_function(msg2, flush=True)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
@@ -164,15 +164,15 @@ def test_not_captured(capfd):
|
||||
m.raw_output(msg)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert stream.getvalue() == ""
|
||||
assert not stderr
|
||||
assert not stream.getvalue()
|
||||
|
||||
stream = StringIO()
|
||||
with redirect_stdout(stream):
|
||||
m.captured_output(msg)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
assert stdout == ""
|
||||
assert stderr == ""
|
||||
assert not stdout
|
||||
assert not stderr
|
||||
assert stream.getvalue() == msg
|
||||
|
||||
|
||||
@@ -182,16 +182,16 @@ def test_err(capfd):
|
||||
with redirect_stderr(stream):
|
||||
m.raw_err(msg)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
assert stdout == ""
|
||||
assert not stdout
|
||||
assert stderr == msg
|
||||
assert stream.getvalue() == ""
|
||||
assert not stream.getvalue()
|
||||
|
||||
stream = StringIO()
|
||||
with redirect_stderr(stream):
|
||||
m.captured_err(msg)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
assert stdout == ""
|
||||
assert stderr == ""
|
||||
assert not stdout
|
||||
assert not stderr
|
||||
assert stream.getvalue() == msg
|
||||
|
||||
|
||||
@@ -221,13 +221,13 @@ def test_redirect(capfd):
|
||||
m.raw_output(msg)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
assert stdout == msg
|
||||
assert stream.getvalue() == ""
|
||||
assert not stream.getvalue()
|
||||
|
||||
stream = StringIO()
|
||||
with redirect_stdout(stream), m.ostream_redirect():
|
||||
m.raw_output(msg)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
assert stdout == ""
|
||||
assert not stdout
|
||||
assert stream.getvalue() == msg
|
||||
|
||||
stream = StringIO()
|
||||
@@ -235,7 +235,7 @@ def test_redirect(capfd):
|
||||
m.raw_output(msg)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
assert stdout == msg
|
||||
assert stream.getvalue() == ""
|
||||
assert not stream.getvalue()
|
||||
|
||||
|
||||
def test_redirect_err(capfd):
|
||||
@@ -248,7 +248,7 @@ def test_redirect_err(capfd):
|
||||
m.raw_err(msg2)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ""
|
||||
assert not stderr
|
||||
assert stream.getvalue() == msg2
|
||||
|
||||
|
||||
@@ -262,8 +262,8 @@ def test_redirect_both(capfd):
|
||||
m.raw_output(msg)
|
||||
m.raw_err(msg2)
|
||||
stdout, stderr = capfd.readouterr()
|
||||
assert stdout == ""
|
||||
assert stderr == ""
|
||||
assert not stdout
|
||||
assert not stderr
|
||||
assert stream.getvalue() == msg
|
||||
assert stream2.getvalue() == msg2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user