Update prtester.py

This commit is contained in:
Bocki 2024-10-14 11:50:30 +02:00 committed by GitHub
parent 129e84a93e
commit b621ffeecc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

4
.github/prtester.py vendored
View File

@ -40,7 +40,7 @@ def main(instances: Iterable[Instance], with_upload: bool, with_reduced_upload:
def testBridges(instance: Instance, bridge_cards: Iterable, with_upload: bool, with_reduced_upload: bool) -> Iterable: def testBridges(instance: Instance, bridge_cards: Iterable, with_upload: bool, with_reduced_upload: bool) -> Iterable:
instance_suffix = '' instance_suffix = ''
prid = os.environ.get("PR") prid = os.environ.get["PR"]
tester_url = f'https://bockiii.github.io/prs/{prid}/' tester_url = f'https://bockiii.github.io/prs/{prid}/'
if instance.name: if instance.name:
instance_suffix = f' ({instance.name})' instance_suffix = f' ({instance.name})'
@ -146,7 +146,7 @@ def testBridges(instance: Instance, bridge_cards: Iterable, with_upload: bool, w
filename = f'{os.getcwd()}/{instance.name}_{form_number}.html' filename = f'{os.getcwd()}/{instance.name}_{form_number}.html'
with open(file=filename, mode='wb') as file: with open(file=filename, mode='wb') as file:
file.write(page_text) file.write(page_text)
table_rows.append(f'| {bridge_name} | [{form_number} {context_name}{instance_suffix}]({tester_url}/{filename}) | {status} |') table_rows.append(f'| {bridge_name} | [{form_number} {context_name}{instance_suffix}]({tester_url}/{instance.name}_{form_number}.html) | {status} |')
form_number += 1 form_number += 1
return table_rows return table_rows