Skip to content

Conversation

@mosquito
Copy link
Owner

@mosquito mosquito commented Jan 7, 2026

This pull request introduces significant improvements to testing, code organization, and developer tooling for the project. The main focus is on expanding test coverage for edge cases and error handling, refactoring utility functions for clarity, and enhancing development workflows with new tools and coverage configuration.

Testing improvements:

  • Added comprehensive tests for AR and DEB archive error handling, including missing or invalid headers, unsupported compression formats, truncated data, and invalid magic bytes (tests/test_ar.py).
  • Introduced edge case and root directory handling tests for DebBuilder, ensuring correct normalization of control file paths, proper inclusion of symlinks, and correct directory handling (tests/test_builder.py).
  • Added extensive tests for the CLI pack command, covering file parsing, directory handling, error messages, and symlink support (tests/test_cli_pack.py).

Code organization and refactoring:

  • Refactored utility functions in debx/cli/inspect.py (format_size, format_mode, format_time) to be private (prefixed with _) and moved them outside of the main function for better modularity and clarity. Updated all usages accordingly.

Developer tooling and configuration:

  • Added ruff as a development dependency for linting and code quality enforcement in pyproject.toml.
  • Introduced coverage configuration to enable branch coverage and exclude specific lines from reports, improving test quality monitoring (pyproject.toml).

Minor improvements:

  • Fixed logging string formatting in debx/builder.py to use standard string interpolation for consistency.
  • Updated test imports to include new error and reader classes where needed.

@mosquito mosquito force-pushed the feature/more-tests branch from ab9e2c9 to 0a97f1a Compare January 7, 2026 14:42
@mosquito mosquito merged commit 82481c5 into master Jan 7, 2026
16 checks passed
@mosquito mosquito deleted the feature/more-tests branch January 7, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant