test: add test coverage for tests/helpers.py#10778
Open
joewanko wants to merge 1 commit intopython-poetry:mainfrom
Open
test: add test coverage for tests/helpers.py#10778joewanko wants to merge 1 commit intopython-poetry:mainfrom
joewanko wants to merge 1 commit intopython-poetry:mainfrom
Conversation
Adds comprehensive tests for helper functions that were previously untested: - get_package: tests package creation with various yanked states - get_dependency: tests dependency creation with constraints, groups, etc. - copy_path: tests file and directory copying with overwrite behavior - with_working_directory: tests working directory context manager - pbs_installer_supported_arch: tests architecture detection Also reorganizes existing tests into classes for better structure. Closes python-poetry#9161
Reviewer's GuideAdds comprehensive unit tests for helper utilities in tests/helpers.py, reorganizing existing tests into structured test classes while preserving prior behavior, and increasing coverage for package/dependency helpers, filesystem helpers, environment/working-directory context managers, and architecture support detection. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive test coverage for helper functions in
tests/helpers.pythat were previously untested.Changes
New tests added for:
get_package: Tests package creation with name, version, and various yanked states (bool and string)get_dependency: Tests dependency creation with different constraints, optional flags, groups, and prereleasescopy_path: Tests file and directory copying, including overwrite behaviorwith_working_directory: Tests the context manager for changing working directories with optional copy behaviorpbs_installer_supported_arch: Tests architecture detection for supported architectures (arm64, aarch64, amd64, x86_64, i686, x86)Reorganization
Testing
All 43 tests pass:
Related Issue
Closes #9161
This is my first contribution to Poetry - happy to make any adjustments based on feedback!
Summary by Sourcery
Add comprehensive unit tests for helper utilities and organize existing helper tests into structured test classes.
Tests: