File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 44
55from libvcs .url import parse
66from libvcs .url .git import GitURL
7+ from libvcs .url .hg import HgURL
78
89if t .TYPE_CHECKING :
910 from typing_extensions import TypeAlias
@@ -21,10 +22,26 @@ class DetectVCSFixture(t.NamedTuple):
2122
2223
2324TEST_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 ),
You can’t perform that action at this time.
0 commit comments