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 4
4
5
5
from libvcs .url import parse
6
6
from libvcs .url .git import GitURL
7
+ from libvcs .url .hg import HgURL
7
8
8
9
if t .TYPE_CHECKING :
9
10
from typing_extensions import TypeAlias
@@ -21,10 +22,26 @@ class DetectVCSFixture(t.NamedTuple):
21
22
22
23
23
24
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
+ ],
24
41
DetectVCSFixture (
25
- url = "git+https ://github. com/vcs-python/libvcs.git " ,
42
+ url = "hg+http ://hg.example. com/MyProject@da39a3ee5e6b " ,
26
43
expected_matches_lazy = [
27
- lambda url : parse .ParserMatch (vcs = "git " , match = GitURL (url ))
44
+ lambda url : parse .ParserMatch (vcs = "hg " , match = HgURL (url ))
28
45
],
29
46
is_explicit = True ,
30
47
),
You can’t perform that action at this time.
0 commit comments