equal
deleted
inserted
replaced
1 # Test that certain objects conform to well-defined interfaces. |
1 # Test that certain objects conform to well-defined interfaces. |
2 |
2 |
3 from __future__ import absolute_import, print_function |
3 from __future__ import absolute_import, print_function |
4 |
4 |
5 from mercurial import ( |
5 from mercurial import ( |
|
6 bundlerepo, |
6 httppeer, |
7 httppeer, |
7 localrepo, |
8 localrepo, |
8 sshpeer, |
9 sshpeer, |
|
10 statichttprepo, |
9 ui as uimod, |
11 ui as uimod, |
|
12 unionrepo, |
10 ) |
13 ) |
11 |
14 |
12 def checkobject(o): |
15 def checkobject(o): |
13 """Verify a constructed object conforms to interface rules. |
16 """Verify a constructed object conforms to interface rules. |
14 |
17 |
65 |
68 |
66 checkobject(badpeer()) |
69 checkobject(badpeer()) |
67 checkobject(httppeer.httppeer(ui, 'http://localhost')) |
70 checkobject(httppeer.httppeer(ui, 'http://localhost')) |
68 checkobject(localrepo.localpeer(dummyrepo())) |
71 checkobject(localrepo.localpeer(dummyrepo())) |
69 checkobject(testingsshpeer(ui, 'ssh://localhost/foo')) |
72 checkobject(testingsshpeer(ui, 'ssh://localhost/foo')) |
|
73 checkobject(bundlerepo.bundlepeer(dummyrepo())) |
|
74 checkobject(statichttprepo.statichttppeer(dummyrepo())) |
|
75 checkobject(unionrepo.unionpeer(dummyrepo())) |
70 |
76 |
71 main() |
77 main() |