Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
42368f9b
Commit
42368f9b
authored
Apr 13, 2011
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary imports and use assertIs instead of assertTrue.
parent
c7533051
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
Lib/json/tests/test_scanstring.py
Lib/json/tests/test_scanstring.py
+0
-1
Lib/json/tests/test_speedups.py
Lib/json/tests/test_speedups.py
+3
-4
No files found.
Lib/json/tests/test_scanstring.py
View file @
42368f9b
import
sys
import
decimal
from
unittest
import
TestCase
,
skipUnless
import
json
...
...
Lib/json/tests/test_speedups.py
View file @
42368f9b
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
.
assert
True
(
decoder
.
scanstring
is
decoder
.
c_scanstring
)
self
.
assert
Is
(
decoder
.
scanstring
,
decoder
.
c_scanstring
)
def
test_encode_basestring_ascii
(
self
):
self
.
assertEqual
(
encoder
.
encode_basestring_ascii
.
__module__
,
"_json"
)
self
.
assert
True
(
encoder
.
encode_basestring_ascii
is
encoder
.
c_encode_basestring_ascii
)
self
.
assert
Is
(
encoder
.
encode_basestring_ascii
,
encoder
.
c_encode_basestring_ascii
)
class
TestDecode
(
TestCase
):
def
test_make_scanner
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment