diff --git a/changes/2383.misc.rst b/changes/2383.misc.rst new file mode 100644 index 0000000000..4b1fb79766 --- /dev/null +++ b/changes/2383.misc.rst @@ -0,0 +1 @@ +Resolved E501 line too long errors in test_signing.py. diff --git a/pyproject.toml b/pyproject.toml index 1a21f2cd5a..c2b0f30607 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -300,7 +300,6 @@ known-third-party = ["build"] [tool.ruff.lint.per-file-ignores] # E501: line too long, to be fixed in future changes "tests/integrations/*" = ["E501"] -"tests/platforms/*" = ["E501"] [tool.rumdl] flavor = "mkdocs" diff --git a/tests/platforms/android/gradle/test_android_log_clean_filter.py b/tests/platforms/android/gradle/test_android_log_clean_filter.py index 653a6fc26f..ac236c7c67 100644 --- a/tests/platforms/android/gradle/test_android_log_clean_filter.py +++ b/tests/platforms/android/gradle/test_android_log_clean_filter.py @@ -44,7 +44,8 @@ ("Python app launched & stored in Android Activity class", True), ), ( - "\x1b[32mI/python.stdout: Python app launched & stored in Android Activity class\x1b[0m", + "\x1b[32mI/python.stdout: Python app launched & " + "stored in Android Activity class\x1b[0m", ("Python app launched & stored in Android Activity class", True), ), ( @@ -68,7 +69,8 @@ ("test_case (tests.foobar.test_other.TestOtherMethods)", True), ), ( - "\x1b[32mI/python.stderr: test_case (tests.foobar.test_other.TestOtherMethods)\x1b[0m", + "\x1b[32mI/python.stderr: test_case " + "(tests.foobar.test_other.TestOtherMethods)\x1b[0m", ("test_case (tests.foobar.test_other.TestOtherMethods)", True), ), ( diff --git a/tests/platforms/macOS/app/test_signing.py b/tests/platforms/macOS/app/test_signing.py index a8b85dc387..7947594b45 100644 --- a/tests/platforms/macOS/app/test_signing.py +++ b/tests/platforms/macOS/app/test_signing.py @@ -102,8 +102,12 @@ def test_explicit_app_identity_checksum(dummy_command): """If the user nominates an app identity by checksum, it is used.""" # get_identities will return some options. dummy_command.get_identities.return_value = { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), } # The identity will be the one the user specified as an option. @@ -122,8 +126,12 @@ def test_explicit_app_identity_name(dummy_command): """If the user nominates an app identity by name, it is used.""" # get_identities will return some options. dummy_command.get_identities.return_value = { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), } # The identity will be the one the user specified as an option. @@ -142,8 +150,12 @@ def test_invalid_app_identity_name(dummy_command): """If the user nominates an app identity by name, it is used.""" # get_identities will return some options. dummy_command.get_identities.return_value = { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), } # The identity will be the one the user specified as an option. @@ -198,8 +210,12 @@ def test_select_app_identity(dummy_command): """The user can select from a list of app identities.""" # get_identities will return some options. dummy_command.get_identities.return_value = { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), } # Return option 3 @@ -221,8 +237,12 @@ def test_select_app_identity_no_adhoc(dummy_command): """Adhoc identities can be excluded from the list of options.""" # get_identities will return some options. dummy_command.get_identities.return_value = { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), } # Return option 2 @@ -248,13 +268,21 @@ def test_select_installer_identity(dummy_command): dummy_command.get_identities.side_effect = [ { "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), }, { "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "4C1067833814CE4738EBD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", - "8903EC63C238B04C138EBD6F067833814CE47CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)", + "4C1067833814CE4738EBD6F8903EC63C238B0CA3": ( + "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), + "8903EC63C238B04C138EBD6F067833814CE47CA3": ( + "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)" + ), }, ] @@ -281,26 +309,45 @@ def test_select_installer_identity(dummy_command): def test_installer_identity_matching_app(dummy_command): """The list of possible installer identities includes non-app identities from the same team.""" - # get_identities is invoked twice - once with app identities, and once with all identities. + # get_identities is invoked twice - once with app identities, and once with + # all identities. dummy_command.get_identities.side_effect = [ { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "EBD6F8903EC63C238B0384C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (83DLEZ2K43)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), }, { # The app identity that will be selected - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), # A different app identity - "EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)", + "EBD6F8903EC63C238B0384C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (83DLEZ2K43)" + ), # An installer identity that doesn't match the selected app identity - "1067833814CE4738EB4CD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (83DLEZ2K43)", + "1067833814CE4738EB4CD6F8903EC63C238B0CA3": ( + "Developer ID Installer: Example Corp Ltd (83DLEZ2K43)" + ), # An installer identity that *does* match the selected app identity - "4C1067833814CE4738EBD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)", + "4C1067833814CE4738EBD6F8903EC63C238B0CA3": ( + "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)" + ), # A different app identity - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), # Another installer identity that match the selected app identity - "8903EC63C238B04C138EBD6F067833814CE47CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)", + "8903EC63C238B04C138EBD6F067833814CE47CA3": ( + "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)" + ), }, ] @@ -331,19 +378,33 @@ def test_installer_identity_no_match(dummy_command): # get_identities is invoked twice - once with app identities, and once with all identities. dummy_command.get_identities.side_effect = [ { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "EBD6F8903EC63C238B0384C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (83DLEZ2K43)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), }, { # The app identity that will be selected - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), # A different app identity - "EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)", + "EBD6F8903EC63C238B0384C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (83DLEZ2K43)" + ), # An installer identity that doesn't match the selected app identity - "1067833814CE4738EB4CD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (83DLEZ2K43)", + "1067833814CE4738EB4CD6F8903EC63C238B0CA3": ( + "Developer ID Installer: Example Corp Ltd (83DLEZ2K43)" + ), # A different app identity - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), }, ]