8000 !squash test_parse · vcs-python/libvcs@158c53f · GitHub
[go: up one dir, main page]

Skip to content

Commit 158c53f

Browse files
committed
!squash test_parse
1 parent 7252392 commit 158c53f

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

tests/url/test_parse.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from libvcs.url import parse
66
from libvcs.url.git import GitURL
7+
from libvcs.url.hg import HgURL
78

89
if t.TYPE_CHECKING:
910
from typing_extensions import TypeAlias
@@ -21,10 +22,26 @@ class DetectVCSFixture(t.NamedTuple):
2122

2223

2324
TEST_FIXTURES: list[DetectVCSFixture] = [
25+
*[
26+
DetectVCSFixture(
27+
url=url,
28+
expected_matches_lazy=[
29+
lambda url: parse.ParserMatch(vcs="git", match=GitURL(url))
30+
],
31+
is_explicit=True,
32+
)
33+
for url in [
34+
"git+https://github.com/vcs-python/libvcs",
35+
"git+https://github.com/vcs-python/libvcs.git",
36+
"git+https://github.com:vcs-python/libvcs.git",
37+
"git+ssh://git@github.com:vcs-python/libvcs.git",
38+
"git+ssh://git@github.com:vcs-python/libvcs",
39+
]
40+
],
2441
DetectVCSFixture(
25-
url="git+https://github.com/vcs-python/libvcs.git",
42+
url="hg+http://hg.example.com/MyProject@da39a3ee5e6b",
2643
expected_matches_lazy=[
27-
lambda url: parse.ParserMatch(vcs="git", match=GitURL(url))
44+
lambda url: parse.ParserMatch(vcs="hg", match=HgURL(url))
2845
],
2946
is_explicit=True,
3047
),

0 commit comments

Comments
 (0)
0