-
Notifications
You must be signed in to change notification settings - Fork 261
fix: Fix handling of "format" in package includes initialization #805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -354,20 +354,29 @@ def test_create_poetry_with_packages_and_includes() -> None: | |
package = poetry.package | ||
|
||
assert package.packages == [ | ||
{"include": "extra_dir/**/*.py"}, | ||
{"include": "extra_dir/**/*.py"}, | ||
{"include": "my_module.py"}, | ||
{"include": "package_with_include"}, | ||
{"include": "tests", "format": "sdist"}, | ||
{"include": "extra_dir/**/*.py", "format": ["sdist", "wheel"]}, | ||
sourcery-ai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{"include": "extra_dir/**/*.py", "format": ["sdist", "wheel"]}, | ||
{"include": "my_module.py", "format": ["sdist", "wheel"]}, | ||
{"include": "package_with_include", "format": ["sdist", "wheel"]}, | ||
{"include": "tests", "format": ["sdist"]}, | ||
{"include": "for_wheel_only", "format": ["wheel"]}, | ||
{"include": "src_package", "from": "src"}, | ||
{"include": "from_to", "from": "etc", "to": "target_from_to"}, | ||
{"include": "my_module_to.py", "to": "target_module"}, | ||
{"include": "src_package", "from": "src", "format": ["sdist", "wheel"]}, | ||
{ | ||
"include": "from_to", | ||
"from": "etc", | ||
"to": "target_from_to", | ||
"format": ["sdist", "wheel"], | ||
}, | ||
{ | ||
"include": "my_module_to.py", | ||
"to": "target_module", | ||
"format": ["sdist", "wheel"], | ||
}, | ||
] | ||
|
||
assert package.include == [ | ||
{"path": "extra_dir/vcs_excluded.py", "format": ["sdist", "wheel"]}, | ||
{"path": "notes.txt"}, | ||
{"path": "notes.txt", "format": ["sdist"]}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (testing): Test explicit format exclusion Add a test case where "format" explicitly excludes a default format (e.g., Suggested implementation: assert package.include == [
{"path": "extra_dir/vcs_excluded.py", "format": ["sdist", "wheel"]},
{"path": "notes.txt", "format": ["sdist"]},
{"path": "format_excluded.txt", "format": ["wheel"]},
] You'll also need to:
|
||
] | ||
|
||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.