Skip to content

Commit 99702bf

Browse files
committed
fix: Resolve f-string syntax error in language sanitization tests
- Fix backslash in f-string expression on line 588 - Extract string operations outside f-string to avoid syntax error - Maintain same functionality for error reporting in test suite Fixes GitHub Actions test failure for Python 3.10+ compatibility
1 parent 8eb453c commit 99702bf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_language_sanitization.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,12 +585,14 @@ def main():
585585
if result.failures:
586586
print(f"\nFailures:")
587587
for test, traceback in result.failures:
588-
print(f" - {test}: {traceback.split('AssertionError: ')[-1].split('\\n')[0]}")
588+
error_msg = traceback.split('AssertionError: ')[-1].split('\n')[0]
589+
print(f" - {test}: {error_msg}")
589590

590591
if result.errors:
591592
print(f"\nErrors:")
592593
for test, traceback in result.errors:
593-
print(f" - {test}: {traceback.split('\\n')[-2]}")
594+
error_msg = traceback.split('\n')[-2]
595+
print(f" - {test}: {error_msg}")
594596

595597
return 0 if result.wasSuccessful() else 1
596598

0 commit comments

Comments
 (0)