Skip to content
Snippets Groups Projects
Commit 54ba8ef88915 authored by Bob Ippolito's avatar Bob Ippolito
Browse files

Merge branch 'master' into str-decode

Branches
No related tags found
No related merge requests found
......@@ -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,)
......
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'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment