Enable Python 3.5 testing and fix tests
Fixes to a couple of places to make the python 3.5 tests pass. Change-Id: I3f4b73b24fbe336ac6c80b7aa224a830ab7e36a6
This commit is contained in:
@@ -52,7 +52,9 @@ class AngularGettextHTMLParser(html_parser.HTMLParser):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
try:
|
try:
|
||||||
super(AngularGettextHTMLParser, self).__init__()
|
super(AngularGettextHTMLParser, self).__init__(
|
||||||
|
convert_charrefs=False
|
||||||
|
)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# handle HTMLParser not being a type on Python 2
|
# handle HTMLParser not being a type on Python 2
|
||||||
html_parser.HTMLParser.__init__(self)
|
html_parser.HTMLParser.__init__(self)
|
||||||
|
@@ -50,7 +50,7 @@ class NaNJSONEncoder(json.JSONEncoder):
|
|||||||
o = o.decode(_encoding)
|
o = o.decode(_encoding)
|
||||||
return _orig_encoder(o)
|
return _orig_encoder(o)
|
||||||
|
|
||||||
def floatstr(o, allow_nan=self.allow_nan, _repr=encoder.FLOAT_REPR,
|
def floatstr(o, allow_nan=self.allow_nan, _repr=float.__repr__,
|
||||||
_inf=encoder.INFINITY, _neginf=-encoder.INFINITY):
|
_inf=encoder.INFINITY, _neginf=-encoder.INFINITY):
|
||||||
# Check for specials. Note that this type of test is processor
|
# Check for specials. Note that this type of test is processor
|
||||||
# and/or platform-specific, so do tests which don't depend on the
|
# and/or platform-specific, so do tests which don't depend on the
|
||||||
|
@@ -326,7 +326,8 @@ if os.path.exists(LOCAL_SETTINGS_DIR_PATH):
|
|||||||
for filename in sorted(filenames):
|
for filename in sorted(filenames):
|
||||||
if filename.endswith(".py"):
|
if filename.endswith(".py"):
|
||||||
try:
|
try:
|
||||||
execfile(os.path.join(dirpath, filename))
|
with open(os.path.join(dirpath, filename)) as f:
|
||||||
|
exec(f.read())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.exception(
|
logging.exception(
|
||||||
"Can not exec settings snippet %s" % filename)
|
"Can not exec settings snippet %s" % filename)
|
||||||
|
8
tox.ini
8
tox.ini
@@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = pep8,py27dj18,py27,py34,releasenotes
|
envlist = pep8,py27dj18,py27,py34,py35,releasenotes
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
@@ -45,6 +45,12 @@ setenv =
|
|||||||
{[testenv]setenv}
|
{[testenv]setenv}
|
||||||
PYTHONUNBUFFERED=1
|
PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
[testenv:py35]
|
||||||
|
basepython = python3.5
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
|
Reference in New Issue
Block a user