mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
test: Add tests for pypi and pypi_resolver
This commit is contained in:
@@ -92,7 +92,12 @@ type PyPIPackage struct {
|
||||
|
||||
var httpClient = &http.Client{Timeout: 10 * time.Second}
|
||||
|
||||
func pipGetLatestMatchingVersion(packageName, versionConstraint string) (string, error) {
|
||||
func pipGetMatchingVersion(packageName, versionConstraint string) (string, error) {
|
||||
// Already a exact version
|
||||
if strings.HasPrefix(versionConstraint, "==") {
|
||||
return versionConstraint, nil
|
||||
}
|
||||
|
||||
// Handle compatible release operator
|
||||
if strings.HasPrefix(versionConstraint, "~=") {
|
||||
versionConstraint = pipConvertCompatibleRelease(versionConstraint)
|
||||
|
||||
Reference in New Issue
Block a user