From 7f3729f95ce63f9737ed4c64bf38aa7e5060793f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 28 Aug 2015 17:20:03 +0200 Subject: [PATCH] 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 --- horizon/utils/babel_extract_angular.py | 4 ++-- tox.ini | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/horizon/utils/babel_extract_angular.py b/horizon/utils/babel_extract_angular.py index b1f1d5b3f9..96a9144f19 100644 --- a/horizon/utils/babel_extract_angular.py +++ b/horizon/utils/babel_extract_angular.py @@ -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 diff --git a/tox.ini b/tox.ini index 1c31f2e7bb..45c5def70b 100644 --- a/tox.ini +++ b/tox.ini @@ -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 \