Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
simplejson
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
Python
Modules
simplejson
Commits
54ba8ef88915
Commit
54ba8ef88915
authored
7 years ago
by
Bob Ippolito
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into str-decode
parents
f108294d5a2c
8f81c56a8efe
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
simplejson/compat.py
+6
-5
6 additions, 5 deletions
simplejson/compat.py
simplejson/tests/__init__.py
+7
-1
7 additions, 1 deletion
simplejson/tests/__init__.py
with
13 additions
and
6 deletions
simplejson/compat.py
+
6
−
5
View file @
54ba8ef8
...
...
@@ -5,8 +5,11 @@
PY3
=
False
def
b
(
s
):
return
s
import
cStringIO
as
StringIO
StringIO
=
BytesIO
=
StringIO
.
StringIO
try
:
from
cStringIO
import
StringIO
except
ImportError
:
from
StringIO
import
StringIO
BytesIO
=
StringIO
text_type
=
unicode
binary_type
=
str
string_types
=
(
basestring
,)
...
...
@@ -21,9 +24,7 @@
from
imp
import
reload
as
reload_module
def
b
(
s
):
return
bytes
(
s
,
'
latin1
'
)
import
io
StringIO
=
io
.
StringIO
BytesIO
=
io
.
BytesIO
from
io
import
StringIO
,
BytesIO
text_type
=
str
binary_type
=
bytes
string_types
=
(
str
,)
...
...
This diff is collapsed.
Click to expand it.
simplejson/tests/__init__.py
+
7
−
1
View file @
54ba8ef8
from
__future__
import
absolute_import
import
unittest
import
doctest
import
sys
import
os
...
...
@@ -28,6 +27,13 @@
import
simplejson.decoder
if
suite
is
None
:
suite
=
unittest
.
TestSuite
()
try
:
import
doctest
except
ImportError
:
if
sys
.
version_info
<
(
2
,
7
):
# doctests in 2.6 depends on cStringIO
return
suite
raise
for
mod
in
(
simplejson
,
simplejson
.
encoder
,
simplejson
.
decoder
):
suite
.
addTest
(
doctest
.
DocTestSuite
(
mod
))
suite
.
addTest
(
doctest
.
DocFileSuite
(
'
../../index.rst
'
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment