tests/run-tests.py
changeset 25057 cf49cf074ec2
parent 25056 e5f6c6ec21b8
child 25058 caa2043cc322
equal deleted inserted replaced
25056:e5f6c6ec21b8 25057:cf49cf074ec2
  2099 
  2099 
  2100         cmd = '%s -c "import mercurial; print (mercurial.__path__[0])"'
  2100         cmd = '%s -c "import mercurial; print (mercurial.__path__[0])"'
  2101         pipe = os.popen(cmd % PYTHON)
  2101         pipe = os.popen(cmd % PYTHON)
  2102         try:
  2102         try:
  2103             self._hgpath = pipe.read().strip()
  2103             self._hgpath = pipe.read().strip()
       
  2104             if sys.version_info[0] == 3:
       
  2105                 self._hgpath = self._hgpath.encode('utf-8')
  2104         finally:
  2106         finally:
  2105             pipe.close()
  2107             pipe.close()
  2106 
  2108 
  2107         return self._hgpath
  2109         return self._hgpath
  2108 
  2110