[PATCH] doctest: drop hack to run py2/3 tests selectively

Yuya Nishihara yuya at tcha.org
Sun Oct 1 08:25:15 UTC 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1506515928 -32400
#      Wed Sep 27 21:38:48 2017 +0900
# Node ID 8de6dc4ab3304251a0bce4154603b784d4d519a0
# Parent  b52f22d9afa5a8abd4acd6aa27f8c2e413d087c1
doctest: drop hack to run py2/3 tests selectively

All doctests pass on Python 3.

diff --git a/tests/test-doctest.py b/tests/test-doctest.py
--- a/tests/test-doctest.py
+++ b/tests/test-doctest.py
@@ -24,10 +24,7 @@ class py3docchecker(doctest.OutputChecke
         return any(doctest.OutputChecker.check_output(self, w, g, optionflags)
                    for w, g in [(want, got), (want2, got2)])
 
-# TODO: migrate doctests to py3 and enable them on both versions
-def testmod(name, optionflags=0, testtarget=None, py2=True, py3=True):
-    if not (not ispy3 and py2 or ispy3 and py3):
-        return
+def testmod(name, optionflags=0, testtarget=None):
     __import__(name)
     mod = sys.modules[name]
     if testtarget is not None:


More information about the Mercurial-devel mailing list