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:
parent
63ddedf69d
commit
b05658735b
@ -52,7 +52,9 @@ class AngularGettextHTMLParser(html_parser.HTMLParser):
|
||||
|
||||
def __init__(self):
|
||||
try:
|
||||
super(AngularGettextHTMLParser, self).__init__()
|
||||
super(AngularGettextHTMLParser, self).__init__(
|
||||
convert_charrefs=False
|
||||
)
|
||||
except TypeError:
|
||||
# handle HTMLParser not being a type on Python 2
|
||||
html_parser.HTMLParser.__init__(self)
|
||||
|
@ -50,7 +50,7 @@ class NaNJSONEncoder(json.JSONEncoder):
|
||||
o = o.decode(_encoding)
|
||||
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):
|
||||
# Check for specials. Note that this type of test is processor
|
||||
# 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):
|
||||
if filename.endswith(".py"):
|
||||
try:
|
||||
execfile(os.path.join(dirpath, filename))
|
||||
with open(os.path.join(dirpath, filename)) as f:
|
||||
exec(f.read())
|
||||
except Exception as e:
|
||||
logging.exception(
|
||||
"Can not exec settings snippet %s" % filename)
|
||||
|
8
tox.ini
8
tox.ini
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = pep8,py27dj18,py27,py34,releasenotes
|
||||
envlist = pep8,py27dj18,py27,py34,py35,releasenotes
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
|
||||
@ -45,6 +45,12 @@ setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
[testenv:py35]
|
||||
basepython = python3.5
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
[testenv:pep8]
|
||||
usedevelop = True
|
||||
whitelist_externals =
|
||||
|
Loading…
Reference in New Issue
Block a user