diff --git a/.travis.yml b/.travis.yml index 599071f..15276b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - "2.6" - "2.7" install: "pip install -r requirements.txt --use-mirrors && npm install acorn" script: nosetests diff --git a/appvalidator/errorbundle/basebundle.py b/appvalidator/errorbundle/basebundle.py index 4ec5b24..bc45abc 100644 --- a/appvalidator/errorbundle/basebundle.py +++ b/appvalidator/errorbundle/basebundle.py @@ -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 diff --git a/appvalidator/specs/webapps.py b/appvalidator/specs/webapps.py index 9c1122d..f00b7a0 100644 --- a/appvalidator/specs/webapps.py +++ b/appvalidator/specs/webapps.py @@ -1,4 +1,4 @@ -import simplejson as json +import json import types import urlparse diff --git a/appvalidator/testcases/javascript/acorn.py b/appvalidator/testcases/javascript/acorn.py index 62a937b..8e4150a 100644 --- a/appvalidator/testcases/javascript/acorn.py +++ b/appvalidator/testcases/javascript/acorn.py @@ -1,7 +1,7 @@ import re import subprocess -import simplejson as json +import json from appvalidator.contextgenerator import ContextGenerator import appvalidator.unicodehelper as unicodehelper diff --git a/appvalidator/testcases/javascript/spidermonkey.py b/appvalidator/testcases/javascript/spidermonkey.py index 349d7f0..d2eb4a1 100644 --- a/appvalidator/testcases/javascript/spidermonkey.py +++ b/appvalidator/testcases/javascript/spidermonkey.py @@ -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) diff --git a/appvalidator/webapp.py b/appvalidator/webapp.py index aa78b7c..ce395c6 100644 --- a/appvalidator/webapp.py +++ b/appvalidator/webapp.py @@ -1,4 +1,4 @@ -import simplejson as json +import json import unicodehelper from .specs.webapps import WebappSpec diff --git a/requirements.txt b/requirements.txt index cc2f02c..32c8eb0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/tests/test_controlchars.py b/tests/test_controlchars.py index 95da743..7f10af6 100644 --- a/tests/test_controlchars.py +++ b/tests/test_controlchars.py @@ -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 diff --git a/tests/test_errorbundler.py b/tests/test_errorbundler.py index e021a52..c722acf 100644 --- a/tests/test_errorbundler.py +++ b/tests/test_errorbundler.py @@ -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_ diff --git a/tests/test_webapp.py b/tests/test_webapp.py index f6a97b7..d1c8525 100644 --- a/tests/test_webapp.py +++ b/tests/test_webapp.py @@ -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_