Skip to content

Commit af9dfc9

Browse files
Fix Windows test failures due to incorrect f-string escaping
The child process tests were failing on Windows because the nested f-strings had incorrect brace escaping. When an f-string is defined inside another f-string, the inner f-string expressions should use single braces to be evaluated, not double braces. Fixed three instances where {{time.time()}} should be {time.time()}: - Line 385: test_stdio_client_child_process_cleanup - Line 485: test_stdio_client_nested_process_tree (grandchild) - Line 579: test_stdio_client_early_parent_exit This allows the time.time() expression to be properly evaluated when the child scripts are executed, enabling the tests to verify that child processes are writing to their marker files. Reported-by: Felix Weinberger
1 parent dc70495 commit af9dfc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/client/test_stdio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ async def test_stdio_client_nested_process_tree():
482482
grandchild_script = \"\"\"import time
483483
with open({repr(grandchild_file)}, 'a') as f:
484484
while True:
485-
f.write(f"gc {{time.time()}}")
485+
f.write(f"gc {time.time()}")
486486
f.flush()
487487
time.sleep(0.1)\"\"\"
488488

0 commit comments

Comments
 (0)