diff options
author | Ezio Melotti <none@none> | 2011-04-12 13:06:43 (GMT) |
---|---|---|
committer | Ezio Melotti <none@none> | 2011-04-12 13:06:43 (GMT) |
commit | 4ded0c046226856c9b46aef6e5ea760c414018c4 (patch) | |
tree | c2fb8dac414b04b411e8b229ee2dc51488222168 /Lib/json | |
parent | 1b93021214531e1b825dd31e802838191beae581 (diff) | |
download | cpython-4ded0c046226856c9b46aef6e5ea760c414018c4.zip cpython-4ded0c046226856c9b46aef6e5ea760c414018c4.tar.gz cpython-4ded0c046226856c9b46aef6e5ea760c414018c4.tar.bz2 |
Remove unnecessary imports and use assertIs instead of assertTrue.
Diffstat (limited to 'Lib/json')
-rw-r--r-- | Lib/json/tests/test_scanstring.py | 1 | ||||
-rw-r--r-- | Lib/json/tests/test_speedups.py | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/Lib/json/tests/test_scanstring.py b/Lib/json/tests/test_scanstring.py index 2a7ec82..d858161 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 c6051cf..1505065 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): |