Commit Graph
7 Commits
Author SHA1 Message Date
xixu-me da2baa46c5 Add integration and unit tests for tzst library functionality
- Created integration tests for complex scenarios in `tests/integration/test_complex_scenarios.py`.
- Added unit tests for core functionality, convenience functions, security features, and error handling in `tests/unit/test_archive_basics.py`, `tests/unit/test_convenience_functions.py`, `tests/unit/test_security_and_errors.py`.
- Implemented tests for temporary file exclusion, large file operations, and complex directory structures.
- Included tests for atomic operations and compression level validation.
- Established a structure for integration and unit tests with appropriate docstrings and assertions.
2025-06-02 05:40:42 +08:00
xixu-me 17c530ef21 Fix current directory archiving logic
Updated `_create_archive_impl` to handle current directory archiving more robustly, including resolving paths, excluding temporary files, and ensuring the archive file itself is excluded. Added comprehensive tests to verify behavior for edge cases and temporary file exclusion patterns.
2025-06-01 23:19:09 +08:00
xixu-me 22dc90259b Add version argument and update tests
Introduced a '--version' argument in the CLI to display version information. Updated test cases to reflect changes in compression level validation and error codes. Adjusted special character handling in test_core.py and added integration test markers in pyproject.toml.
2025-06-01 18:37:27 +08:00
xixu-me acd9ced29e Fixes critical path resolution bug and consolidates tests
Resolves a critical bug in non-atomic archive creation where relative
archive paths failed when the working directory changed during operation.
The fix converts archive paths to absolute before changing directories.

Consolidates duplicate CLI and security tests into comprehensive test
suites to eliminate redundancy and improve maintainability. Adds
extensive edge case coverage including platform-specific features,
Unicode handling, and performance scenarios.

Updates version to 1.0.1 and ensures proper exit code propagation
in the main entry point for better script integration.
2025-06-01 14:57:31 +08:00
xixu-me c53637aaf7 Add strict mode to zip iteration in tests
Updated tests in `test_core.py` to use the `strict=True` parameter in `zip` for better error handling when iterating over buffered and streaming contents. This ensures mismatched lengths are caught during testing.
2025-05-31 15:53:56 +08:00
xixu-me 521a6858fb Add streaming mode and atomic operations
Introduced streaming mode for memory-efficient handling of large archives and added atomic file operations for reliable archive creation. Updated CLI commands, core functionality, and tests to support these features. Improved error handling and documentation for append mode and compression level validation.
2025-05-30 14:22:07 +08:00
xixu-me 6a3cdd48b8 Initial commit 2025-05-29 21:59:21 +08:00