forked from datalad/datalad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add submodule URL candidates by URL-rewrite to match parent protocol
- Loading branch information
Showing
4 changed files
with
71 additions
and
47 deletions.
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 |
---|---|---|
|
@@ -12,7 +12,10 @@ | |
import os | ||
from os.path import join as opj | ||
|
||
from datalad.distribution.utils import _get_flexible_source_candidates | ||
from datalad.distribution.utils import ( | ||
_get_flexible_source_candidates, | ||
rewrite_match_scheme, | ||
) | ||
from datalad.support.gitrepo import GitRepo | ||
from datalad.tests.utils_pytest import ( | ||
assert_raises, | ||
|
@@ -26,6 +29,13 @@ | |
) | ||
|
||
|
||
def test_rewrite_match_scheme(): | ||
ssh_url = "[email protected]:user/repo.git" | ||
https_url = "https://domain.com/user/repo.git" | ||
assert rewrite_match_scheme(ssh_url, https_url) == ssh_url | ||
assert rewrite_match_scheme(https_url, ssh_url) == https_url | ||
|
||
|
||
@known_failure_windows | ||
def test_get_flexible_source_candidates(): | ||
f = _get_flexible_source_candidates | ||
|
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