From 78b368f88bc61e656686b472ab50b77be91d5872 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 28 Jun 2022 16:10:59 +0200 Subject: [PATCH] enforce black code format for tests/checkupdates.TestCase --- pyproject.toml | 1 - tests/checkupdates.TestCase | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a6262ae2..876053c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,6 @@ force-exclude = '''( | tests/gradle-release-checksums\.py | tests/openssl-version-check-test\.py | tests/valid-package-names/test\.py - | tests/checkupdates\.TestCase | tests/common\.TestCase | tests/publish\.TestCase | tests/signatures\.TestCase diff --git a/tests/checkupdates.TestCase b/tests/checkupdates.TestCase index 8399695d..5451433a 100755 --- a/tests/checkupdates.TestCase +++ b/tests/checkupdates.TestCase @@ -267,9 +267,9 @@ class CheckupdatesTest(unittest.TestCase): vcs.latesttags.return_value = ['1.1.9', '1.1.8'] with mock.patch( 'pathlib.Path.read_text', lambda a: 'v1.1.9\nc10109' - ) as _ignored, mock.patch.object( - Path, 'is_file' - ) as mock_path, mock.patch('fdroidserver.common.getvcs', return_value=vcs): + ) as _ignored, mock.patch.object(Path, 'is_file') as mock_path, mock.patch( + 'fdroidserver.common.getvcs', return_value=vcs + ): _ignored # silence the linters mock_path.is_file.return_falue = True vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None) @@ -279,9 +279,9 @@ class CheckupdatesTest(unittest.TestCase): app.UpdateCheckData = r'b.txt|c(.*)|.|v(.*)' with mock.patch( 'pathlib.Path.read_text', lambda a: 'v1.1.0\nc10109' - ) as _ignored, mock.patch.object( - Path, 'is_file' - ) as mock_path, mock.patch('fdroidserver.common.getvcs', return_value=vcs): + ) as _ignored, mock.patch.object(Path, 'is_file') as mock_path, mock.patch( + 'fdroidserver.common.getvcs', return_value=vcs + ): _ignored # silence the linters mock_path.is_file.return_falue = True vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None) @@ -291,9 +291,9 @@ class CheckupdatesTest(unittest.TestCase): app.UpdateCheckData = r'b.txt|c(.*)||' with mock.patch( 'pathlib.Path.read_text', lambda a: 'v1.1.9\nc10109' - ) as _ignored, mock.patch.object( - Path, 'is_file' - ) as mock_path, mock.patch('fdroidserver.common.getvcs', return_value=vcs): + ) as _ignored, mock.patch.object(Path, 'is_file') as mock_path, mock.patch( + 'fdroidserver.common.getvcs', return_value=vcs + ): _ignored # silence the linters mock_path.is_file.return_falue = True vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None) @@ -304,9 +304,9 @@ class CheckupdatesTest(unittest.TestCase): app.UpdateCheckData = r'b.txt|c(.*)||Android-([\d.]+)' with mock.patch( 'pathlib.Path.read_text', lambda a: 'v1.1.9\nc10109' - ) as _ignored, mock.patch.object( - Path, 'is_file' - ) as mock_path, mock.patch('fdroidserver.common.getvcs', return_value=vcs): + ) as _ignored, mock.patch.object(Path, 'is_file') as mock_path, mock.patch( + 'fdroidserver.common.getvcs', return_value=vcs + ): _ignored # silence the linters mock_path.is_file.return_falue = True vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None)