Add gettext install.

When we pulled this from nova, the gettext.install went away, but it
turns out that it's super important, otherwise the import test gets
messed up by _ and our assumption that it gets imported from the
execution entrypoints in bin/ and the test runner.

Change-Id: I7e51d93c44af9f08d7177097c3992127d5851ce0
Reviewed-on: https://review.openstack.org/26970
Reviewed-by: Joe Gordon <jogo@cloudscaling.com>
Approved: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Monty Taylor 2013-04-15 14:16:46 -07:00 committed by Jenkins
parent 46e0d502a3
commit 44135d136c

View File

@ -21,6 +21,7 @@
Built as a sets of pep8 checks using flake8.
"""
import gettext
import imp
import logging
import os
@ -33,6 +34,9 @@ import traceback
# Don't need this for testing
logging.disable('LOG')
# Import tests need to inject _ properly into the builtins
gettext.install('hacking', unicode=1)
def flake8ext(f):
f.name = __name__