summaryrefslogtreecommitdiffstats
path: root/Lib/test/json_tests/test_scanstring.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-04-13 04:18:24 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-04-13 04:18:24 (GMT)
commit04c6423fbab6f4a525d56cedc91600a52d74f062 (patch)
treef6f0099cd34a142ddbc5f53569d46dadedc34cab /Lib/test/json_tests/test_scanstring.py
parent1a20c121ef3cfc53cf8ec754cbba8ef82933f175 (diff)
parentd210aa1ad9329661625ca5f0b6754f84ffc25021 (diff)
downloadcpython-04c6423fbab6f4a525d56cedc91600a52d74f062.zip
cpython-04c6423fbab6f4a525d56cedc91600a52d74f062.tar.gz
cpython-04c6423fbab6f4a525d56cedc91600a52d74f062.tar.bz2
Merge with 3.1.
Diffstat (limited to 'Lib/test/json_tests/test_scanstring.py')
-rw-r--r--Lib/test/json_tests/test_scanstring.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/json_tests/test_scanstring.py b/Lib/test/json_tests/test_scanstring.py
index d503851..abd3253 100644
--- a/Lib/test/json_tests/test_scanstring.py
+++ b/Lib/test/json_tests/test_scanstring.py
@@ -1,14 +1,19 @@
import sys
-import decimal
-from unittest import TestCase
+from unittest import TestCase, skipUnless
import json
import json.decoder
+try:
+ import _json
+except ImportError:
+ _json = None
+
class TestScanString(TestCase):
def test_py_scanstring(self):
self._test_scanstring(json.decoder.py_scanstring)
+ @skipUnless(_json, 'test requires the _json module')
def test_c_scanstring(self):
if json.decoder.c_scanstring is not None:
self._test_scanstring(json.decoder.c_scanstring)