Merge pull request #49 from diox/remove-simplejson
Replace simplejson by json (bug 915256)
This commit is contained in:
Коммит
0c842712a2
|
@ -1,6 +1,5 @@
|
|||
language: python
|
||||
python:
|
||||
- "2.6"
|
||||
- "2.7"
|
||||
install: "pip install -r requirements.txt --use-mirrors && npm install acorn"
|
||||
script: nosetests
|
||||
|
|
|
@ -3,7 +3,7 @@ import types
|
|||
import uuid
|
||||
from StringIO import StringIO
|
||||
|
||||
import simplejson as json
|
||||
import json
|
||||
|
||||
from .outputhandlers.shellcolors import OutputHandler
|
||||
from .. import unicodehelper
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import simplejson as json
|
||||
import json
|
||||
import types
|
||||
import urlparse
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import re
|
||||
import subprocess
|
||||
|
||||
import simplejson as json
|
||||
import json
|
||||
|
||||
from appvalidator.contextgenerator import ContextGenerator
|
||||
import appvalidator.unicodehelper as unicodehelper
|
||||
|
|
|
@ -2,7 +2,7 @@ import re
|
|||
import subprocess
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
||||
import simplejson as json
|
||||
import json
|
||||
|
||||
from appvalidator.constants import SPIDERMONKEY_INSTALLATION
|
||||
from appvalidator.contextgenerator import ContextGenerator
|
||||
|
@ -140,7 +140,7 @@ def get_tree_from_spidermonkey(shell, code):
|
|||
data = unicodehelper.decode(data)
|
||||
try:
|
||||
return json.loads(data, strict=False)
|
||||
except json.decoder.JSONDecodeError:
|
||||
except ValueError:
|
||||
# Okay, maybe it was an encoding issue.
|
||||
data = run_with_tempfile(shell, code)
|
||||
data = unicodehelper.decode(data)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import simplejson as json
|
||||
import json
|
||||
|
||||
import unicodehelper
|
||||
from .specs.webapps import WebappSpec
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
cssutils==0.9.7
|
||||
Fabric==0.9.0
|
||||
nose==1.0.0
|
||||
simplejson==2.3.0
|
||||
argparse==1.1
|
||||
-e git://github.com/mattbasta/fastchardet#egg=fastchardet
|
||||
mock==1.0b1
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
from simplejson import JSONDecodeError
|
||||
import sys
|
||||
|
||||
from nose.tools import eq_, nottest, raises
|
||||
|
@ -35,7 +34,7 @@ class TestControlChars(TestCase):
|
|||
self.assert_failed(with_warnings=True)
|
||||
eq_(self.err.warnings[0]["id"][2], "syntax_error")
|
||||
|
||||
@raises(JSONDecodeError)
|
||||
@raises(ValueError)
|
||||
def test_controlchar_in_webapp(self):
|
||||
"""
|
||||
Test that unescaped control characters cause parse errors in the webapp
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import sys
|
||||
from StringIO import StringIO
|
||||
|
||||
import simplejson as json
|
||||
import json
|
||||
from mock import patch
|
||||
from nose.tools import eq_
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import os
|
|||
import tempfile
|
||||
import types
|
||||
|
||||
import simplejson as json
|
||||
import json
|
||||
from mock import patch
|
||||
from nose.tools import eq_
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче