summaryrefslogtreecommitdiffstats
path: root/Lib/json/tests/test_speedups.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/json/tests/test_speedups.py')
-rw-r--r--Lib/json/tests/test_speedups.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/json/tests/test_speedups.py b/Lib/json/tests/test_speedups.py
index 9438154..6f34cac 100644
--- a/Lib/json/tests/test_speedups.py
+++ b/Lib/json/tests/test_speedups.py
@@ -1,8 +1,14 @@
import decimal
-from unittest import TestCase
+from unittest import TestCase, skipUnless
from json import decoder, encoder, scanner
+try:
+ import _json
+except ImportError:
+ _json = None
+
+@skipUnless(_json, 'test requires the _json module')
class TestSpeedups(TestCase):
def test_scanstring(self):
self.assertEqual(decoder.scanstring.__module__, "_json")