qzyu999 opened a new pull request, #3722:
URL: https://github.com/apache/iceberg-python/pull/3722
## Rationale
Prerequisite for #2477. Makes `make test` pass on Windows by fixing platform
assumptions in test code.
Depends on #3721 (IO: Fix Windows drive letters misidentified as URI
schemes).
**No library code changes** all changes are in test files and `conftest.py`.
## Result
`\n3803 passed, 3 skipped, 0 failures, 0 errors (Windows, Python 3.12)\n``n
## Changes
| Category | Files | Fix |
|----------|-------|-----|
| MAX_PATH (260 chars) | `conftest.py` | `RANDOM_LENGTH = 8` (was 20) |
| SQLite URI format | `conftest.py`, `test_sql.py` | `warehouse.as_posix()`
in URI construction |
| File locking (WinError 32) | `test_io.py`, `test_pyarrow.py` | Close file
handles before temp cleanup |
| Path assertions | `test_pyarrow.py` | `os.path.abspath()` instead of
hardcoded paths |
| File URI format | `test_pyarrow.py` | Raw paths instead of `file:{tmpdir}`
|
| Rich box rendering | `test_pyarrow.py` | Content assertions instead of
exact formatting |
| Error message format | `test_pyarrow.py` | Relaxed match (`[WinError 2]`
vs `[Errno 2]`) |
| Path separators | `test_hive.py` | Normalize backslashes in assertions |
| Kerberos unavailable | `test_hive.py` | `skipif(sys.platform == 'win32')` |
| Temp dir cleanup | `test_manifest.py` | `ignore_cleanup_errors=True` |
## Are these changes tested?
Yes full `make test` equivalent run locally on Windows: 3803 passed.
All changes are backwards-compatible on Linux (assertions use platform-aware
values, `skipif` only fires on Windows, `as_posix()` is a no-op on POSIX).
## Are there any user-facing changes?
No. Test-only changes.
Related: #2477
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]