Mercurial > public > mercurial-scm > hg-stable
diff tests/run-tests.py @ 28126:562a073a2a1b
tests: load json with no fallback
The json module should be available in Python 2.6 or newer.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 09 Jan 2016 13:20:15 +0900 |
parents | a5f0c0aab2bb |
children | 807bc140e915 |
line wrap: on
line diff
--- a/tests/run-tests.py Tue Dec 15 23:50:48 2015 +0900 +++ b/tests/run-tests.py Sat Jan 09 13:20:15 2016 +0900 @@ -48,6 +48,7 @@ from distutils import version import difflib import errno +import json import optparse import os import shutil @@ -69,15 +70,6 @@ import unittest osenvironb = getattr(os, 'environb', os.environ) - -try: - import json -except ImportError: - try: - import simplejson as json - except ImportError: - json = None - processlock = threading.Lock() if sys.version_info > (3, 5, 0): @@ -1725,8 +1717,6 @@ xuf.write(doc.toprettyxml(indent=' ', encoding='utf-8')) if self._runner.options.json: - if json is None: - raise ImportError("json module not installed") jsonpath = os.path.join(self._runner._testdir, 'report.json') with open(jsonpath, 'w') as fp: timesd = {}