From 6a29f1c0fe46e290fb35d198e104368db403a34d Mon Sep 17 00:00:00 2001 From: Seb M'Caw Date: Mon, 14 Oct 2024 13:56:42 +0000 Subject: [PATCH] Support Python 3.9 --- testsuite/tests/publish/multiple-remotes/test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/publish/multiple-remotes/test.py b/testsuite/tests/publish/multiple-remotes/test.py index b9ea5f040..809d14ec9 100644 --- a/testsuite/tests/publish/multiple-remotes/test.py +++ b/testsuite/tests/publish/multiple-remotes/test.py @@ -6,6 +6,7 @@ import os import re import subprocess +from typing import Optional from drivers.alr import run_alr, init_local_crate from drivers.asserts import assert_match @@ -66,7 +67,7 @@ def test_publishing( extra_args: list[str], remote: int, commit_id: str, - output_pattern: str | None = None, + output_pattern: Optional[str] = None, ): """ Run `alr --force publish --skip-submit` with the specified additional args, @@ -92,7 +93,10 @@ def test_publishing( assert_match(rf'.*url = "git\+file:.*remote{remote}"', manifest) assert_match(rf'.*commit = "{commit_id}"', manifest) -def check_publishing_fails(extra_args: list[str], error_pattern: str | None): +def check_publishing_fails( + extra_args: list[str], + error_pattern: Optional[str] = None, +): """ Run `alr --force publish --skip-submit` with the specified additional args, and assert that it fails (optionally asserting the output matches a regex