mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 06:52:23 +03:00
py3: make .py tests continue to run on python 2
Summary: Use sed to convert testutil.ddot requires to hghave. ignore-conflict-markers for test-simplemerge.py Reviewed By: simpkins Differential Revision: D19658355 fbshipit-source-id: afae73eb1e43ead79514dfaf9f911f51ac25972e
This commit is contained in:
parent
4e10dbb9f6
commit
5232dcf9d1
@ -10,10 +10,10 @@ import time
|
|||||||
|
|
||||||
from edenscm.mercurial import ancestor, debugcommands, hg, pycompat, ui as uimod, util
|
from edenscm.mercurial import ancestor, debugcommands, hg, pycompat, ui as uimod, util
|
||||||
from edenscm.mercurial.node import nullrev
|
from edenscm.mercurial.node import nullrev
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
if sys.version_info[0] >= 3:
|
if sys.version_info[0] >= 3:
|
||||||
long = int
|
long = int
|
||||||
|
@ -4,10 +4,10 @@ import unittest
|
|||||||
|
|
||||||
from edenscm.mercurial import mdiff
|
from edenscm.mercurial import mdiff
|
||||||
from edenscm.mercurial.context import _annotatepair, annotateline
|
from edenscm.mercurial.context import _annotatepair, annotateline
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
xrange(0)
|
xrange(0)
|
||||||
|
@ -9,11 +9,11 @@ from __future__ import absolute_import
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from hghave import require
|
||||||
from testutil import argspans
|
from testutil import argspans
|
||||||
from testutil.dott import feature
|
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -7,10 +7,10 @@ import tempfile
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from edenscm.mercurial import util
|
from edenscm.mercurial import util
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
atomictempfile = util.atomictempfile
|
atomictempfile = util.atomictempfile
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
from edenscm.mercurial import error, peer, util, wireproto
|
from edenscm.mercurial import error, peer, util, wireproto
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
# equivalent of repo.repository
|
# equivalent of repo.repository
|
||||||
|
@ -5,10 +5,10 @@ import struct
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from edenscm.mercurial import mdiff
|
from edenscm.mercurial import mdiff
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
class diffreplace(collections.namedtuple("diffreplace", "start end from_ to")):
|
class diffreplace(collections.namedtuple("diffreplace", "start end from_ to")):
|
||||||
|
@ -9,10 +9,10 @@ import unittest
|
|||||||
import silenttestrunner
|
import silenttestrunner
|
||||||
from bindings import bookmarkstore
|
from bindings import bookmarkstore
|
||||||
from edenscm.mercurial import node
|
from edenscm.mercurial import node
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
class bookmarkstoretests(unittest.TestCase):
|
class bookmarkstoretests(unittest.TestCase):
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
from edenscm.mercurial import bundlerepo, httppeer, localrepo, sshpeer, ui as uimod
|
from edenscm.mercurial import bundlerepo, httppeer, localrepo, sshpeer, ui as uimod
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def checkobject(o):
|
def checkobject(o):
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def checkpath(path, dllnames):
|
def checkpath(path, dllnames):
|
||||||
|
@ -4,10 +4,10 @@ import os
|
|||||||
|
|
||||||
from edenscm.mercurial import context, encoding, hg, scmutil, ui as uimod
|
from edenscm.mercurial import context, encoding, hg, scmutil, ui as uimod
|
||||||
from edenscm.mercurial.node import hex
|
from edenscm.mercurial.node import hex
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
u = uimod.ui.load()
|
u = uimod.ui.load()
|
||||||
|
@ -9,9 +9,9 @@ demandimport.enable()
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
# Only run if demandimport is allowed
|
# Only run if demandimport is allowed
|
||||||
if subprocess.call(["python", "%s/hghave" % os.environ["TESTDIR"], "demandimport"]):
|
if subprocess.call(["python", "%s/hghave" % os.environ["TESTDIR"], "demandimport"]):
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import, print_function
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from edenscm.mercurial import dispatch
|
from edenscm.mercurial import dispatch
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def testdispatch(cmd):
|
def testdispatch(cmd):
|
||||||
|
@ -7,10 +7,10 @@ import os
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
ispy3 = sys.version_info[0] >= 3
|
ispy3 = sys.version_info[0] >= 3
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import, print_function
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from edenscm.mercurial import commands, extensions, ui as uimod
|
from edenscm.mercurial import commands, extensions, ui as uimod
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
ignore = {
|
ignore = {
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from edenscm.mercurial import encoding
|
from edenscm.mercurial import encoding
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
class IsasciistrTest(unittest.TestCase):
|
class IsasciistrTest(unittest.TestCase):
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
from edenscm.mercurial import extensions
|
from edenscm.mercurial import extensions
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def genwrapper(x):
|
def genwrapper(x):
|
||||||
|
@ -2,10 +2,10 @@ import os
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from edenscm.hgext.convert.repo import gitutil, repo
|
from edenscm.hgext.convert.repo import gitutil, repo
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def draft(test_func):
|
def draft(test_func):
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import
|
|||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
from edenscm.hgext import absorb
|
from edenscm.hgext import absorb
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
class simplefctx(object):
|
class simplefctx(object):
|
||||||
|
@ -10,10 +10,10 @@ import unittest
|
|||||||
import silenttestrunner
|
import silenttestrunner
|
||||||
from edenscm.hgext import extutil
|
from edenscm.hgext import extutil
|
||||||
from edenscm.mercurial import error, vfs, worker
|
from edenscm.mercurial import error, vfs, worker
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
locktimeout = 25
|
locktimeout = 25
|
||||||
|
@ -4,10 +4,10 @@ import os
|
|||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from edenscm.hgext.fastannotate import error, revmap
|
from edenscm.hgext.fastannotate import error, revmap
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import silenttestrunner
|
import silenttestrunner
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
class BisectTests(unittest.TestCase):
|
class BisectTests(unittest.TestCase):
|
||||||
|
@ -5,10 +5,10 @@ import sys
|
|||||||
|
|
||||||
from edenscm.hgext import patchrmdir
|
from edenscm.hgext import patchrmdir
|
||||||
from edenscm.mercurial import util
|
from edenscm.mercurial import util
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
if not sys.platform.startswith("linux"):
|
if not sys.platform.startswith("linux"):
|
||||||
|
@ -18,10 +18,10 @@ from edenscm.hgext.remotefilelog import constants
|
|||||||
from edenscm.hgext.remotefilelog.datapack import datapackstore
|
from edenscm.hgext.remotefilelog.datapack import datapackstore
|
||||||
from edenscm.mercurial import error
|
from edenscm.mercurial import error
|
||||||
from edenscm.mercurial.node import nullid
|
from edenscm.mercurial.node import nullid
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
SMALLFANOUTCUTOFF = 2 ** 16 / 8
|
SMALLFANOUTCUTOFF = 2 ** 16 / 8
|
||||||
|
@ -15,10 +15,10 @@ from bindings import revisionstore
|
|||||||
from edenscm.hgext.remotefilelog.metadatastore import unionmetadatastore
|
from edenscm.hgext.remotefilelog.metadatastore import unionmetadatastore
|
||||||
from edenscm.mercurial import error, ui as uimod, util
|
from edenscm.mercurial import error, ui as uimod, util
|
||||||
from edenscm.mercurial.node import nullid
|
from edenscm.mercurial.node import nullid
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
SMALLFANOUTCUTOFF = 2 ** 16 / 8
|
SMALLFANOUTCUTOFF = 2 ** 16 / 8
|
||||||
|
@ -7,10 +7,10 @@ import sys
|
|||||||
# Make sure we use sshaskpass.py in this repo, unaffected by PYTHONPATH
|
# Make sure we use sshaskpass.py in this repo, unaffected by PYTHONPATH
|
||||||
from edenscm.hgext import sshaskpass
|
from edenscm.hgext import sshaskpass
|
||||||
from edenscm.mercurial import error
|
from edenscm.mercurial import error
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
if not sys.platform.startswith("linux"):
|
if not sys.platform.startswith("linux"):
|
||||||
|
@ -12,10 +12,10 @@ from edenscm.mercurial import (
|
|||||||
util,
|
util,
|
||||||
vfs as vfsmod,
|
vfs as vfsmod,
|
||||||
)
|
)
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -6,10 +6,10 @@ from __future__ import absolute_import, print_function
|
|||||||
|
|
||||||
from edenscm.mercurial import hg, ui as uimod
|
from edenscm.mercurial import hg, ui as uimod
|
||||||
from edenscm.mercurial.node import hex, nullid
|
from edenscm.mercurial.node import hex, nullid
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
myui = uimod.ui.load()
|
myui = uimod.ui.load()
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
from edenscm.mercurial import hg
|
from edenscm.mercurial import hg
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def testparse(url, branch=[]):
|
def testparse(url, branch=[]):
|
||||||
|
@ -5,10 +5,10 @@ import sys
|
|||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from edenscm.mercurial import commands, hg, ui
|
from edenscm.mercurial import commands, hg, ui
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
from edenscm.mercurial import store
|
from edenscm.mercurial import store
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def show(s):
|
def show(s):
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
from edenscm.hgext.lfs import pointer
|
from edenscm.hgext.lfs import pointer
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def tryparse(text):
|
def tryparse(text):
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from edenscm.mercurial import error, mdiff
|
from edenscm.mercurial import error, mdiff
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
# for readability, line numbers are 0-origin
|
# for readability, line numbers are 0-origin
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import, print_function
|
|||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from edenscm.hgext import linkrevcache
|
from edenscm.hgext import linkrevcache
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -17,10 +17,10 @@ from edenscm.mercurial import (
|
|||||||
util,
|
util,
|
||||||
vfs as vfsmod,
|
vfs as vfsmod,
|
||||||
)
|
)
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
testlockname = "testlock"
|
testlockname = "testlock"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
from edenscm.mercurial import util
|
from edenscm.mercurial import util
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def printifpresent(d, xs, name="d"):
|
def printifpresent(d, xs, name="d"):
|
||||||
|
@ -6,10 +6,10 @@ import unittest
|
|||||||
|
|
||||||
import silenttestrunner
|
import silenttestrunner
|
||||||
from edenscm.mercurial import manifest as manifestmod, match as matchmod
|
from edenscm.mercurial import manifest as manifestmod, match as matchmod
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
EMTPY_MANIFEST = b""
|
EMTPY_MANIFEST = b""
|
||||||
|
@ -4,10 +4,10 @@ import unittest
|
|||||||
|
|
||||||
import silenttestrunner
|
import silenttestrunner
|
||||||
from edenscm.mercurial import match as matchmod
|
from edenscm.mercurial import match as matchmod
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
class NeverMatcherTests(unittest.TestCase):
|
class NeverMatcherTests(unittest.TestCase):
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import, print_function
|
|||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
from edenscm.mercurial import minirst
|
from edenscm.mercurial import minirst
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def debugformat(text, form, **kwargs):
|
def debugformat(text, form, **kwargs):
|
||||||
|
@ -17,10 +17,10 @@ import sys
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from edenscm.mercurial import pycompat, store
|
from edenscm.mercurial import pycompat, store
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -10,10 +10,10 @@ import os
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from edenscm.mercurial import hg, localrepo, ui as uimod, util
|
from edenscm.mercurial import hg, localrepo, ui as uimod, util
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
# create some special property cache that trace they call
|
# create some special property cache that trace they call
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import, print_function
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from edenscm.mercurial import hg, merge, ui as uimod
|
from edenscm.mercurial import hg, merge, ui as uimod
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
u = uimod.ui.load()
|
u = uimod.ui.load()
|
||||||
|
@ -5,10 +5,10 @@ from __future__ import absolute_import, print_function
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from edenscm.mercurial import encoding, node, revlog, transaction, vfs
|
from edenscm.mercurial import encoding, node, revlog, transaction, vfs
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
# TESTTMP is optional. This makes it convenient to run without run-tests.py
|
# TESTTMP is optional. This makes it convenient to run without run-tests.py
|
||||||
|
@ -9,10 +9,10 @@ import doctest
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
# this is hack to make sure no escape characters are inserted into the output
|
# this is hack to make sure no escape characters are inserted into the output
|
||||||
|
@ -49,11 +49,6 @@
|
|||||||
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
|
||||||
from testutil.dott import feature
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import thread
|
import thread
|
||||||
import threading
|
import threading
|
||||||
@ -63,6 +58,10 @@ from thread import get_ident, start_new_thread
|
|||||||
|
|
||||||
import silenttestrunner
|
import silenttestrunner
|
||||||
from bindings import threading as rustthreading
|
from bindings import threading as rustthreading
|
||||||
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
# From test_support.py
|
# From test_support.py
|
||||||
|
@ -5,10 +5,10 @@ import unittest
|
|||||||
import silenttestrunner
|
import silenttestrunner
|
||||||
from edenscm.mercurial import error, scmutil
|
from edenscm.mercurial import error, scmutil
|
||||||
from edenscm.mercurial.pycompat import encodeutf8
|
from edenscm.mercurial.pycompat import encodeutf8
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
class mockfile(object):
|
class mockfile(object):
|
||||||
|
@ -18,10 +18,10 @@ from __future__ import absolute_import
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from edenscm.mercurial import error, simplemerge, util
|
from edenscm.mercurial import error, simplemerge, util
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
TestCase = unittest.TestCase
|
TestCase = unittest.TestCase
|
||||||
|
@ -5,10 +5,10 @@ import unittest
|
|||||||
|
|
||||||
import silenttestrunner
|
import silenttestrunner
|
||||||
from edenscm.mercurial import sshserver, wireproto
|
from edenscm.mercurial import sshserver, wireproto
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
class SSHServerGetArgsTests(unittest.TestCase):
|
class SSHServerGetArgsTests(unittest.TestCase):
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
sys.exit(80)
|
sys.exit(80)
|
||||||
|
@ -5,10 +5,10 @@ import sys
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from edenscm.mercurial import commands, fscap, hg, ui as uimod, util
|
from edenscm.mercurial import commands, fscap, hg, ui as uimod, util
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
TESTDIR = os.environ["TESTDIR"]
|
TESTDIR = os.environ["TESTDIR"]
|
||||||
|
@ -9,10 +9,10 @@ import unittest
|
|||||||
|
|
||||||
import silenttestrunner
|
import silenttestrunner
|
||||||
from bindings import treestate
|
from bindings import treestate
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
testtmp = os.getenv("TESTTMP") or tempfile.mkdtemp("test-treestate")
|
testtmp = os.getenv("TESTTMP") or tempfile.mkdtemp("test-treestate")
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import, print_function
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from edenscm.mercurial import dispatch, ui as uimod
|
from edenscm.mercurial import dispatch, ui as uimod
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
# ensure errors aren't buffered
|
# ensure errors aren't buffered
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
from edenscm.mercurial import dispatch, error, ui as uimod
|
from edenscm.mercurial import dispatch, error, ui as uimod
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
testui = uimod.ui.load()
|
testui = uimod.ui.load()
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import, print_function
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from edenscm.mercurial import ui as uimod
|
from edenscm.mercurial import ui as uimod
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
hgrc = os.environ["HGRCPATH"]
|
hgrc = os.environ["HGRCPATH"]
|
||||||
|
@ -5,10 +5,10 @@ import doctest
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from edenscm.mercurial import sslutil
|
from edenscm.mercurial import sslutil
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
def check(a, b):
|
def check(a, b):
|
||||||
|
@ -11,9 +11,9 @@ unexpected errors and to compare different versions of it."""
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
# Only run if slow tests are allowed
|
# Only run if slow tests are allowed
|
||||||
if subprocess.call(["python", "%s/hghave" % os.environ["TESTDIR"], "slow"]):
|
if subprocess.call(["python", "%s/hghave" % os.environ["TESTDIR"], "slow"]):
|
||||||
|
@ -3,10 +3,10 @@ from __future__ import absolute_import, print_function
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from edenscm.mercurial import hg, scmutil, ui as uimod, util
|
from edenscm.mercurial import hg, scmutil, ui as uimod, util
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
chdir = os.chdir
|
chdir = os.chdir
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
from edenscm.mercurial import ui, util, wireproto
|
from edenscm.mercurial import ui, util, wireproto
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
stringio = util.stringio
|
stringio = util.stringio
|
||||||
|
@ -5,10 +5,10 @@ import unittest
|
|||||||
|
|
||||||
import silenttestrunner
|
import silenttestrunner
|
||||||
from bindings import zstd
|
from bindings import zstd
|
||||||
from testutil.dott import feature
|
from hghave import require
|
||||||
|
|
||||||
|
|
||||||
feature.require(["py2"])
|
require(["py2"])
|
||||||
|
|
||||||
|
|
||||||
class testzstd(unittest.TestCase):
|
class testzstd(unittest.TestCase):
|
||||||
|
Loading…
Reference in New Issue
Block a user