From 819f5abd731a8d48ea05ca01bd2874d298053977 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sun, 16 Apr 2023 19:15:40 +0300 Subject: [PATCH 1/3] testing: remove usages of testdir that sneaked back in --- testing/acceptance_test.py | 6 +++--- testing/logging/test_reporting.py | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 6b421dde6..4dac2cee3 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -1299,12 +1299,12 @@ def test_no_brokenpipeerror_message(pytester: Pytester) -> None: popen.stderr.close() -def test_function_return_non_none_warning(testdir) -> None: - testdir.makepyfile( +def test_function_return_non_none_warning(pytester: Pytester) -> None: + pytester.makepyfile( """ def test_stuff(): return "something" """ ) - res = testdir.runpytest() + res = pytester.runpytest() res.stdout.fnmatch_lines(["*Did you mean to use `assert` instead of `return`?*"]) diff --git a/testing/logging/test_reporting.py b/testing/logging/test_reporting.py index 3cd8599b4..ae2f53277 100644 --- a/testing/logging/test_reporting.py +++ b/testing/logging/test_reporting.py @@ -1167,8 +1167,8 @@ def test_log_file_cli_subdirectories_are_successfully_created( assert result.ret == ExitCode.OK -def test_disable_loggers(testdir): - testdir.makepyfile( +def test_disable_loggers(pytester: Pytester) -> None: + pytester.makepyfile( """ import logging import os @@ -1181,13 +1181,13 @@ def test_disable_loggers(testdir): assert caplog.record_tuples == [('test', 10, 'Visible text!')] """ ) - result = testdir.runpytest("--log-disable=disabled", "-s") + result = pytester.runpytest("--log-disable=disabled", "-s") assert result.ret == ExitCode.OK assert not result.stderr.lines -def test_disable_loggers_does_not_propagate(testdir): - testdir.makepyfile( +def test_disable_loggers_does_not_propagate(pytester: Pytester) -> None: + pytester.makepyfile( """ import logging import os @@ -1205,13 +1205,13 @@ def test_disable_loggers_does_not_propagate(testdir): """ ) - result = testdir.runpytest("--log-disable=parent.child", "-s") + result = pytester.runpytest("--log-disable=parent.child", "-s") assert result.ret == ExitCode.OK assert not result.stderr.lines -def test_log_disabling_works_with_log_cli(testdir): - testdir.makepyfile( +def test_log_disabling_works_with_log_cli(pytester: Pytester) -> None: + pytester.makepyfile( """ import logging disabled_log = logging.getLogger('disabled') @@ -1222,7 +1222,7 @@ def test_log_disabling_works_with_log_cli(testdir): disabled_log.warning("This string will be suppressed.") """ ) - result = testdir.runpytest( + result = pytester.runpytest( "--log-cli-level=DEBUG", "--log-disable=disabled", ) From 2d6206b89a78e2fbcf84094e873b13b15ff7929e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 08:55:36 +0200 Subject: [PATCH 2/3] build(deps): Bump pytest-sugar in /testing/plugins_integration (#10922) Bumps [pytest-sugar](https://github.com/Teemu/pytest-sugar) from 0.9.5 to 0.9.7. - [Release notes](https://github.com/Teemu/pytest-sugar/releases) - [Changelog](https://github.com/Teemu/pytest-sugar/blob/main/CHANGES.rst) - [Commits](https://github.com/Teemu/pytest-sugar/commits/v0.9.7) --- updated-dependencies: - dependency-name: pytest-sugar dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- testing/plugins_integration/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/plugins_integration/requirements.txt b/testing/plugins_integration/requirements.txt index 44889c506..c3746cba5 100644 --- a/testing/plugins_integration/requirements.txt +++ b/testing/plugins_integration/requirements.txt @@ -8,7 +8,7 @@ pytest-flakes==4.0.5 pytest-html==3.2.0 pytest-mock==3.10.0 pytest-rerunfailures==11.1.2 -pytest-sugar==0.9.5 +pytest-sugar==0.9.7 pytest-trio==0.7.0 pytest-twisted==1.14.0 twisted==22.8.0 From 14be71b234a617f487b58a6f277a64c6904b3164 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 07:03:27 +0200 Subject: [PATCH 3/3] [pre-commit.ci] pre-commit autoupdate (#10926) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/PyCQA/autoflake: v2.0.2 → v2.1.0](https://github.com/PyCQA/autoflake/compare/v2.0.2...v2.1.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ca20aec29..5393fcd15 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: exclude: _pytest/(debugging|hookspec).py language_version: python3 - repo: https://github.com/PyCQA/autoflake - rev: v2.0.2 + rev: v2.1.0 hooks: - id: autoflake name: autoflake