From 774f6cfbc1428ad3eb6300e0610b7cc0c2aefaea Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 11:52:22 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/towncrier/test/test_build.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/towncrier/test/test_build.py b/src/towncrier/test/test_build.py index 9b2372ff..99e0f326 100644 --- a/src/towncrier/test/test_build.py +++ b/src/towncrier/test/test_build.py @@ -535,7 +535,6 @@ def test_projectless_changelog(self, runner): with open("foo/newsfragments/124.feature.rst", "w") as f: f.write("Extends levitation") - result = runner.invoke( _main, [ @@ -575,9 +574,7 @@ def test_projectless_changelog(self, runner): ).lstrip(), ) - @with_isolated_simple_project( - config="[tool.towncrier]\n" 'version = "7.8.9"\n' - ) + @with_isolated_simple_project(config="[tool.towncrier]\n" 'version = "7.8.9"\n') def test_version_in_config(self, runner): """The calling towncrier with version defined in configfile. @@ -588,7 +585,6 @@ def test_version_in_config(self, runner): with open("newsfragments/123.feature", "w") as f: f.write("Adds levitation") - result = runner.invoke(_main, ["--date", "01-01-2001", "--draft"]) self.assertEqual(0, result.exit_code, result.output) @@ -616,9 +612,7 @@ def test_version_in_config(self, runner): ).lstrip(), ) - @with_isolated_simple_project( - config="[tool.towncrier]\n" 'name = "ImGoProject"\n' - ) + @with_isolated_simple_project(config="[tool.towncrier]\n" 'name = "ImGoProject"\n') def test_project_name_in_config(self, runner): """The calling towncrier with project name defined in configfile. @@ -629,7 +623,6 @@ def test_project_name_in_config(self, runner): with open("newsfragments/123.feature", "w") as f: f.write("Adds levitation") - result = runner.invoke( _main, ["--version", "7.8.9", "--date", "01-01-2001", "--draft"] ) @@ -673,7 +666,6 @@ def test_no_package_changelog(self, runner): with open("newsfragments/123.feature", "w") as f: f.write("Adds levitation") - result = runner.invoke( _main, ["--version", "7.8.9", "--date", "01-01-2001", "--draft"] ) @@ -718,6 +710,7 @@ def test_release_notes_in_separate_files(self, runner): in a separate file. The name of the file is defined by the `filename` configuration value. """ + def do_build_once_with(version, fragment_file, fragment): with open(f"newsfragments/{fragment_file}", "w") as f: f.write(fragment) @@ -740,9 +733,7 @@ def do_build_once_with(version, fragment_file, fragment): results = [] os.mkdir("newsfragments") - results.append( - do_build_once_with("7.8.9", "123.feature", "Adds levitation") - ) + results.append(do_build_once_with("7.8.9", "123.feature", "Adds levitation")) results.append(do_build_once_with("7.9.0", "456.bugfix", "Adds catapult")) self.assertEqual(0, results[0].exit_code, results[0].output) @@ -788,9 +779,7 @@ def do_build_once_with(version, fragment_file, fragment): ).lstrip(), ) - @with_isolated_simple_project( - config='[tool.towncrier]\n singlefile="fail!"\n' - ) + @with_isolated_simple_project(config='[tool.towncrier]\n singlefile="fail!"\n') def test_singlefile_errors_and_explains_cleanly(self, runner): """ Failure to find the configuration file results in a clean explanation