Commits

Yuya Nishihara committed 8a5fb8c

tests: fix doctest of HgClient to generate stable output on Windows

  • Participants
  • Parent commits 858fabe
  • Branches stable

Comments (0)

Files changed (1)

File tests/helpers.py

     >>> def dummydispatch(args):
     ...     print ' '.join(['hg'] + list(args))
     >>> hg._dispatch = dummydispatch
+    >>> if os.name == 'nt':
+    ...     hg.path = hg.path[2:].replace(os.sep, '/')
+    ...     _wjoin = hg.wjoin
+    ...     def wjoin(path):
+    ...         return _wjoin(path).replace(os.sep, '/')
+    ...     hg.wjoin = wjoin
 
     >>> hg.init()
     hg init /tmp/foo/