chore(python): audit tests
Split the three oversized test files into support modules and topic files, evaluate the rmdir dir_fd capability once at import, and drop unused imports. Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
This commit is contained in:
1 parent
6ec3e902f5
commit
aa4b8a8bdf
20 files changed
+2611
-2418
No files matched your search
@@ -12,9 +12,12 @@ from ._managed_files import DirectorySnapshot, FileSnapshot
|
||||
from ._pinned_directory import PinnedDirectory
|
||||
|
||||
|
||||
_RMDIR_SUPPORTS_DIR_FD = os.rmdir in os.supports_dir_fd
|
||||
|
||||
|
||||
def _remove_posix_private_directory(parent_descriptor: int, name: str) -> None:
|
||||
"""Remove one empty child through the platform's native *at semantics."""
|
||||
if os.rmdir not in os.supports_dir_fd:
|
||||
if not _RMDIR_SUPPORTS_DIR_FD:
|
||||
raise OSError("Host does not support identity-bound directory removal")
|
||||
os.rmdir(name, dir_fd=parent_descriptor)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import tempfile
|
||||
from typing import Dict, List, Optional, Set, Tuple
|
||||
|
||||
from ._dotenv import parse_dotenv
|
||||
from ._managed_files import MAX_SOURCE_BYTES, FileSnapshot, read_physical_file
|
||||
from ._managed_files import MAX_SOURCE_BYTES, read_physical_file
|
||||
from ._runtime import same_path, unique_preconditions
|
||||
from ._transaction import FilePrecondition
|
||||
from .qwen_config import (
|
||||
|
||||
Reference in new issue
Block a user