diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2013-07-27 12:43:13 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2013-07-27 12:43:13 +0200 |
commit | af9834dd14df039dee45a86a94ec17f3a8bc8f44 (patch) | |
tree | 9bf447aeafeb38b21015a3eecf41ec802c188d46 | |
parent | d45522fb1d6484cb1bb494cae93650c25d68f4d4 (diff) | |
download | babel-af9834dd14df039dee45a86a94ec17f3a8bc8f44.tar.gz |
Make tests work without installation
-rw-r--r-- | babel/messages/extract.py | 6 | ||||
-rwxr-xr-x | setup.py | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/babel/messages/extract.py b/babel/messages/extract.py index 44b1eb3..2f8084a 100644 --- a/babel/messages/extract.py +++ b/babel/messages/extract.py @@ -252,7 +252,11 @@ def extract(method, fileobj, keywords=DEFAULT_KEYWORDS, comment_tags=(), # if pkg_resources is not available or no usable egg-info was found # (see #230), we resort to looking up the builtin extractors # directly - builtin = {'ignore': extract_nothing, 'python': extract_python} + builtin = { + 'ignore': extract_nothing, + 'python': extract_python, + 'javascript': extract_javascript + } func = builtin.get(method) if func is None: raise ValueError('Unknown extraction method %r' % method) @@ -65,6 +65,10 @@ setup( zip_safe=False, + # Note when adding extractors: builtin extractors we also want to + # work if packages are not installed to simplify testing. If you + # add an extractor here also manually add it to the "extract" + # function in babel.messages.extract. entry_points=""" [console_scripts] pybabel = babel.messages.frontend:main |