-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add package name deduplication by stemming
- Loading branch information
1 parent
4c2fd1a
commit 5266cf7
Showing
2 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Package name deduplication tests""" | ||
from pipcompilemulti.deduplicate import PackageDeduplicator | ||
|
||
|
||
def test_package_deduplicator_handles_delimiters_normalization(): | ||
"""Tests minor package name variations are handled.""" | ||
package_deduplicator = PackageDeduplicator() | ||
package_deduplicator.on_discover([ | ||
{'in_path': 'a', 'refs': ['b']}, | ||
{'in_path': 'b', 'refs': []} | ||
]) | ||
package_deduplicator.register_packages_for_env('b', {'pkg.name': '1.0'}) | ||
ignored_packages = package_deduplicator.ignored_packages('a') | ||
assert 'pkg-name' in ignored_packages | ||
assert ignored_packages['Pkg_Name'] == '1.0' |