Patchwork [4,of,6,py3] py3: use bytes os.sep in doctest of pathutil.py

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 17, 2017, 4:19 a.m.
Message ID <50be8fba5378fe303aa9.1505621943@mimosa>
Download mbox | patch
Permalink /patch/23979/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 17, 2017, 4:19 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1505618802 -32400
#      Sun Sep 17 12:26:42 2017 +0900
# Node ID 50be8fba5378fe303aa978f16888d0d423715a3e
# Parent  32d2d4b802c30774e37a7c76ff4157ff369910aa
py3: use bytes os.sep in doctest of pathutil.py

Patch

diff --git a/mercurial/pathutil.py b/mercurial/pathutil.py
--- a/mercurial/pathutil.py
+++ b/mercurial/pathutil.py
@@ -203,9 +203,9 @@  def normasprefix(path):
 
     See also issue3033 for detail about need of this function.
 
-    >>> normasprefix(b'/foo/bar').replace(os.sep, b'/')
+    >>> normasprefix(b'/foo/bar').replace(pycompat.ossep, b'/')
     '/foo/bar/'
-    >>> normasprefix(b'/').replace(os.sep, b'/')
+    >>> normasprefix(b'/').replace(pycompat.ossep, b'/')
     '/'
     '''
     d, p = os.path.splitdrive(path)
diff --git a/tests/test-doctest.py b/tests/test-doctest.py
--- a/tests/test-doctest.py
+++ b/tests/test-doctest.py
@@ -58,7 +58,7 @@  testmod('mercurial.match')
 testmod('mercurial.mdiff')
 testmod('mercurial.minirst')
 testmod('mercurial.patch')
-testmod('mercurial.pathutil', py3=False)  # py3: os.sep
+testmod('mercurial.pathutil')
 testmod('mercurial.parser')
 testmod('mercurial.pycompat')
 testmod('mercurial.revsetlang')