Port babel_extract_angular tests to Python 3

* Fix AngularGettextHTMLParser constructor: call the constructor of the
  right parent class.
* tox.ini: Add horizon.test.tests.babel_extract_angular to Python 3.4

Partial-Implements: blueprint porting-python3
Change-Id: I020f9655baf18326f3752b82a8c3bf385c8e1e24
This commit is contained in:
Victor Stinner 2015-08-28 17:20:03 +02:00
parent 9e09cfab2e
commit 7f3729f95c
2 changed files with 3 additions and 2 deletions

View File

@ -41,9 +41,9 @@ class AngularGettextHTMLParser(html_parser.HTMLParser):
def __init__(self):
try:
super(html_parser.HTMLParser, self).__init__()
super(AngularGettextHTMLParser, self).__init__()
except TypeError:
# handle HTMLParser not being a type in < Py3k
# handle HTMLParser not being a type on Python 2
html_parser.HTMLParser.__init__(self)
self.in_translate = False

View File

@ -23,6 +23,7 @@ commands = /bin/bash run_tests.sh -N --no-pep8 {posargs}
commands =
python manage.py test --settings=horizon.test.settings \
horizon.test.tests.base \
horizon.test.tests.babel_extract_angular \
horizon.test.tests.forms \
horizon.test.tests.messages \
horizon.test.tests.middleware \