##// END OF EJS Templates
tests: load json with no fallback...
Yuya Nishihara -
r28126:562a073a default
parent child Browse files
Show More
@@ -335,21 +335,6 b' def has_pygments():'
335 335 except ImportError:
336 336 return False
337 337
338 @check("json", "some json module available")
339 def has_json():
340 try:
341 import json
342 json.dumps
343 return True
344 except ImportError:
345 try:
346 import simplejson as json
347 json.dumps
348 return True
349 except ImportError:
350 pass
351 return False
352
353 338 @check("outer-repo", "outer repo")
354 339 def has_outer_repo():
355 340 # failing for other reasons than 'no repo' imply that there is a repo
@@ -48,6 +48,7 b' from __future__ import print_function'
48 48 from distutils import version
49 49 import difflib
50 50 import errno
51 import json
51 52 import optparse
52 53 import os
53 54 import shutil
@@ -69,15 +70,6 b' from xml.dom import minidom'
69 70 import unittest
70 71
71 72 osenvironb = getattr(os, 'environb', os.environ)
72
73 try:
74 import json
75 except ImportError:
76 try:
77 import simplejson as json
78 except ImportError:
79 json = None
80
81 73 processlock = threading.Lock()
82 74
83 75 if sys.version_info > (3, 5, 0):
@@ -1725,8 +1717,6 b' class TextTestRunner(unittest.TextTestRu'
1725 1717 xuf.write(doc.toprettyxml(indent=' ', encoding='utf-8'))
1726 1718
1727 1719 if self._runner.options.json:
1728 if json is None:
1729 raise ImportError("json module not installed")
1730 1720 jsonpath = os.path.join(self._runner._testdir, 'report.json')
1731 1721 with open(jsonpath, 'w') as fp:
1732 1722 timesd = {}
@@ -1,4 +1,3 b''
1 #require json
2 1 #require serve
3 2
4 3 $ request() {
@@ -530,8 +530,6 b" Missing skips or blacklisted skips don't"
530 530 "result": "skip"
531 531 }
532 532 } (no-eol)
533 #if json
534
535 533 test for --json
536 534 ==================
537 535
@@ -634,8 +632,6 b' Test that failed test accepted through i'
634 632 } (no-eol)
635 633 $ mv backup test-failure.t
636 634
637 #endif
638
639 635 backslash on end of line with glob matching is handled properly
640 636
641 637 $ cat > test-glob-backslash.t << EOF
General Comments 0
You need to be logged in to leave comments. Login now