File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import asyncio
2- import sys
32from typing import Iterable , overload , Any
43
54import nicegui .context
98from nicegui .testing .user import User
109
1110
12- if sys .platform == "win32" :
13- # Python 3.14 on Windows: nicegui's storage cleanup races with subprocess teardown,
14- # leaving storage-general.json locked. Patch unlink to retry once after a short delay.
15- import pathlib
16- import time
17-
18- _original_unlink = pathlib .Path .unlink
19-
20- def _retrying_unlink (self : pathlib .Path , missing_ok : bool = False ) -> None :
21- try :
22- _original_unlink (self , missing_ok = missing_ok )
23- except PermissionError :
24- time .sleep (0.5 )
25- _original_unlink (self , missing_ok = missing_ok )
26-
27- pathlib .Path .unlink = _retrying_unlink # type: ignore[method-assign]
28-
29-
3011@pytest .fixture (autouse = True )
3112def reset_nicegooey_main ():
3213 """Fixture to reset the main_instance before each test."""
You can’t perform that action at this time.
0 commit comments