changeset 1096:c64b73b9783f

git_handler: fix doctests
author Sean Farley <sean@farley.io>
date Mon, 27 Nov 2017 19:15:25 -0500
parents 60a82693d43c
children 80b8188a6eb1
files hggit/git_handler.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/git_handler.py	Thu Nov 30 14:49:06 2017 -0800
+++ b/hggit/git_handler.py	Mon Nov 27 19:15:25 2017 -0500
@@ -649,8 +649,10 @@
 
         >>> from collections import namedtuple
         >>> from mercurial.ui import ui
-        >>> mockrepo = namedtuple('localrepo', ['vfs'])
+        >>> mockrepo = namedtuple('localrepo', ['vfs', 'sharedpath', 'path'])
         >>> mockrepo.vfs = ''
+        >>> mockrepo.sharedpath = ''
+        >>> mockrepo.path = ''
         >>> g = GitHandler(mockrepo, ui()).get_valid_git_username_email
         >>> g('John Doe')
         'John Doe'
@@ -1694,8 +1696,10 @@
         >>> from collections import namedtuple
         >>> from dulwich.client import HttpGitClient, SSHGitClient
         >>> from mercurial.ui import ui
-        >>> mockrepo = namedtuple('localrepo', ['vfs'])
+        >>> mockrepo = namedtuple('localrepo', ['vfs', 'sharedpath', 'path'])
         >>> mockrepo.vfs = ''
+        >>> mockrepo.sharedpath = ''
+        >>> mockrepo.path = ''
         >>> g = GitHandler(mockrepo, ui())
         >>> client, url = g.get_transport_and_path('http://fqdn.com/test.git')
         >>> print isinstance(client, HttpGitClient)