Skip to content

Commit cc052ff

Browse files
committed
Revert "trying to fix the windows error"
This reverts commit 1117e31.
1 parent 1117e31 commit cc052ff

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

tests/conftest.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
import sys
32
from typing import Iterable, overload, Any
43

54
import nicegui.context
@@ -9,24 +8,6 @@
98
from 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)
3112
def reset_nicegooey_main():
3213
"""Fixture to reset the main_instance before each test."""

0 commit comments

Comments
 (0)