@@ -22,26 +22,89 @@ def test_github(self):
22
22
self .pip .repo = 'https://github.com/user/repo/'
23
23
self .assertEqual (self .version .get_github_url (docroot = '/docs/' , filename = 'file' ), 'https://github.com/user/repo/blob/master/docs/file.rst' )
24
24
25
+ self .pip .repo = 'https://github.com/user/repo.github.io'
26
+ self .assertEqual (self .version .get_github_url (docroot = '/docs/' , filename = 'file' ), 'https://github.com/user/repo.github.io/blob/master/docs/file.rst' )
27
+
28
+ self .pip .repo = 'https://github.com/user/repo.github.io/'
29
+ self .assertEqual (self .version .get_github_url (docroot = '/docs/' , filename = 'file' ), 'https://github.com/user/repo.github.io/blob/master/docs/file.rst' )
30
+
25
31
self .pip .repo = 'https://github.com/user/repo.git'
26
32
self .assertEqual (self .version .get_github_url (docroot = '/docs/' , filename = 'file' ), 'https://github.com/user/repo/blob/master/docs/file.rst' )
27
33
34
+ self .pip .repo = 'https://github.com/user/repo.github.io.git'
35
+ self .assertEqual (self .version .get_github_url (docroot = '/docs/' , filename = 'file' ), 'https://github.com/user/repo.github.io/blob/master/docs/file.rst' )
36
+
37
+ self .pip .repo = 'https://github.com/user/repo.git.git'
38
+ self .assertEqual (self .version .get_github_url (docroot = '/docs/' , filename = 'file' ), 'https://github.com/user/repo.git/blob/master/docs/file.rst' )
39
+
40
+ def test_github_ssh (self ):
41
+ self .
pip .
repo = '[email protected] :user/repo.git'
42
+ self .assertEqual (self .version .get_github_url (docroot = '/docs/' , filename = 'file' ), 'https://github.com/user/repo/blob/master/docs/file.rst' )
43
+
44
+ self .
pip .
repo = '[email protected] :user/repo.github.io.git'
45
+ self .assertEqual (self .version .get_github_url (docroot = '/docs/' , filename = 'file' ), 'https://github.com/user/repo.github.io/blob/master/docs/file.rst' )
46
+
28
47
def test_gitlab (self ):
29
48
self .pip .repo = 'https://gitlab.com/user/repo'
30
49
self .assertEqual (self .version .get_gitlab_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://gitlab.com/user/repo/blob/master/foo/bar/file.rst' )
31
50
32
51
self .pip .repo = 'https://gitlab.com/user/repo/'
33
52
self .assertEqual (self .version .get_gitlab_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://gitlab.com/user/repo/blob/master/foo/bar/file.rst' )
34
53
54
+ self .pip .repo = 'https://gitlab.com/user/repo.gitlab.io'
55
+ self .assertEqual (self .version .get_gitlab_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://gitlab.com/user/repo.gitlab.io/blob/master/foo/bar/file.rst' )
56
+
57
+ self .pip .repo = 'https://gitlab.com/user/repo.gitlab.io/'
58
+ self .assertEqual (self .version .get_gitlab_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://gitlab.com/user/repo.gitlab.io/blob/master/foo/bar/file.rst' )
59
+
35
60
self .pip .repo = 'https://gitlab.com/user/repo.git'
36
61
self .assertEqual (self .version .get_gitlab_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://gitlab.com/user/repo/blob/master/foo/bar/file.rst' )
37
62
63
+ self .pip .repo = 'https://gitlab.com/user/repo.gitlab.io.git'
64
+ self .assertEqual (self .version .get_gitlab_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://gitlab.com/user/repo.gitlab.io/blob/master/foo/bar/file.rst' )
65
+
66
+ self .pip .repo = 'https://gitlab.com/user/repo.git.git'
67
+ self .assertEqual (self .version .get_gitlab_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://gitlab.com/user/repo.git/blob/master/foo/bar/file.rst' )
68
+
69
+ def test_gitlab_ssh (self ):
70
+ self .
pip .
repo = '[email protected] :user/repo.git'
71
+ self .assertEqual (self .version .get_gitlab_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://gitlab.com/user/repo/blob/master/foo/bar/file.rst' )
72
+
73
+ self .
pip .
repo = '[email protected] :user/repo.gitlab.io.git'
74
+ self .assertEqual (self .version .get_gitlab_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://gitlab.com/user/repo.gitlab.io/blob/master/foo/bar/file.rst' )
75
+
38
76
def test_bitbucket (self ):
39
77
self .pip .repo = 'https://bitbucket.org/user/repo'
40
78
self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo/src/master/foo/bar/file.rst' )
41
79
42
80
self .pip .repo = 'https://bitbucket.org/user/repo/'
43
81
self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo/src/master/foo/bar/file.rst' )
44
82
83
+ self .pip .repo = 'https://bitbucket.org/user/repo.gitbucket.io'
84
+ self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo.gitbucket.io/src/master/foo/bar/file.rst' )
85
+
86
+ self .pip .repo = 'https://bitbucket.org/user/repo.gitbucket.io/'
87
+ self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo.gitbucket.io/src/master/foo/bar/file.rst' )
88
+
45
89
self .pip .repo = 'https://bitbucket.org/user/repo.git'
90
+ self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo.git/src/master/foo/bar/file.rst' )
91
+
92
+ self .pip .repo = 'https://bitbucket.org/user/repo.gitbucket.io.git'
93
+ self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo.gitbucket.io.git/src/master/foo/bar/file.rst' )
94
+
95
+ self .pip .repo = 'https://bitbucket.org/user/repo.git.git'
96
+ self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo.git.git/src/master/foo/bar/file.rst' )
97
+
98
+ def test_bitbucket_https (self ):
99
+ self .
pip .
repo = 'https://[email protected] /user/repo.git'
100
+ self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo/src/master/foo/bar/file.rst' )
101
+
102
+ self .
pip .
repo = 'https://[email protected] /user/repo.gitbucket.io.git'
103
+ self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo.gitbucket.io/src/master/foo/bar/file.rst' )
104
+
105
+ def test_bitbucket_ssh (self ):
106
+ self .
pip .
repo = '[email protected] :user/repo.git'
46
107
self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo/src/master/foo/bar/file.rst' )
47
108
109
+ self .
pip .
repo = '[email protected] :user/repo.gitbucket.io.git'
110
+ self .assertEqual (self .version .get_bitbucket_url (docroot = '/foo/bar/' , filename = 'file' ), 'https://bitbucket.org/user/repo.gitbucket.io/src/master/foo/bar/file.rst' )
0 commit comments