summaryrefslogtreecommitdiff
path: root/Lib/json
diff options
context:
space:
mode:
authorEzio Melotti <devnull@localhost>2011-04-13 07:08:17 +0300
committerEzio Melotti <devnull@localhost>2011-04-13 07:08:17 +0300
commit7e721b0cd33333621fb02cf735a5eb0aca0b40b5 (patch)
tree9f4d3f66d8c90b73be458ce3148ca6897d23adf6 /Lib/json
parent6a7f2e7204141cefedf8f832695bed1297532a0e (diff)
downloadcpython-7e721b0cd33333621fb02cf735a5eb0aca0b40b5.tar.gz
Remove unnecessary imports and use assertIs instead of assertTrue.
Diffstat (limited to 'Lib/json')
-rw-r--r--Lib/json/tests/test_scanstring.py1
-rw-r--r--Lib/json/tests/test_speedups.py7
2 files changed, 3 insertions, 5 deletions
diff --git a/Lib/json/tests/test_scanstring.py b/Lib/json/tests/test_scanstring.py
index 8f5999eff3..abd325324d 100644
--- a/Lib/json/tests/test_scanstring.py
+++ b/Lib/json/tests/test_scanstring.py
@@ -1,5 +1,4 @@
import sys
-import decimal
from unittest import TestCase, skipUnless
import json
diff --git a/Lib/json/tests/test_speedups.py b/Lib/json/tests/test_speedups.py
index 6f34cacc35..b7c141f7f6 100644
--- a/Lib/json/tests/test_speedups.py
+++ b/Lib/json/tests/test_speedups.py
@@ -1,4 +1,3 @@
-import decimal
from unittest import TestCase, skipUnless
from json import decoder, encoder, scanner
@@ -12,12 +11,12 @@ except ImportError:
class TestSpeedups(TestCase):
def test_scanstring(self):
self.assertEqual(decoder.scanstring.__module__, "_json")
- self.assertTrue(decoder.scanstring is decoder.c_scanstring)
+ self.assertIs(decoder.scanstring, decoder.c_scanstring)
def test_encode_basestring_ascii(self):
self.assertEqual(encoder.encode_basestring_ascii.__module__, "_json")
- self.assertTrue(encoder.encode_basestring_ascii is
- encoder.c_encode_basestring_ascii)
+ self.assertIs(encoder.encode_basestring_ascii,
+ encoder.c_encode_basestring_ascii)
class TestDecode(TestCase):
def test_make_scanner(self):