Commit 3929cee0 by Carlos Andrés Rocha

Update stevedore and test entry point extensions

Change-Id: Ia2507d69b6c00e3c4eb4d8f07dac95b62f90e7ae
parent d23b6a98
......@@ -40,7 +40,7 @@ coverage: test
jenkins: .tox
virtualenv ./venv
./venv/bin/pip install tox
./venv/bin/pip install -U tox
./venv/bin/tox
get_config = $(shell echo "$$ACCEPTANCE_TEST_CONFIG" | python -c 'import sys, json; print json.load(sys.stdin)[sys.argv[1]]' $(1))
......
EXTENSION_NAMESPACE = "edx.analytics.tasks"
"""
Test for tasks extensions using entry points
"""
from stevedore.extension import ExtensionManager
from edx.analytics.tasks import EXTENSION_NAMESPACE
from edx.analytics.tasks.tests import unittest
class TestExtensions(unittest.TestCase):
def test_extensions_config(self):
"""
Test if the edx.analytics.tasks entry_points are configured properly.
Note that extensions are only defined after the package
`edx.analytics.tasks` has been installed.
"""
manager = ExtensionManager(
namespace=EXTENSION_NAMESPACE,
on_load_failure_callback=self.on_load_failure,
verify_requirements=True
)
if len(manager.extensions) == 0:
reason = 'no entry_points for {0} namespace'
raise unittest.SkipTest(reason.format(EXTENSION_NAMESPACE))
def on_load_failure(self, manager, entrypoint, exception):
raise exception
ansible==1.4.4
argparse==1.2.1
boto==2.22.1
filechunkio==1.5
html5lib==1.0b3
numpy==1.8.0
oursql==0.9.3.1
pandas==0.13.0
pbr==0.5.23
stevedore==0.13
tornado==3.1.1
ansible==1.4.4
python-cjson==1.0.5
oursql==0.9.3.1
html5lib==1.0b3
filechunkio==1.5
stevedore==0.14.1
tornado==3.1.1
-e git+https://github.com/spotify/luigi.git@a33756c781b9bf7e51384f0eb19d6a25050ef136#egg=luigi
nose==1.3.0
nose-ignore-docstring==0.2
coverage==3.7
pep8==1.4.5
pylint==0.28
diff-cover >= 0.2.1
mock==1.0.1
nose-ignore-docstring==0.2
nose==1.3.0
pep8==1.4.5
pylint==0.28
unittest2==0.5.1
......@@ -2,8 +2,11 @@
envlist=py26,py27
toxworkdir=/tmp/analytics-tox-cache
# tox does not update the virtualenv after changes to requirement files.
# http://bitbucket.org/hpk42/tox/issue/149/virtualenv-is-not-recreated-when-deps
[testenv]
install_command=pip install --pre --allow-external argparse {opts} {packages}
install_command=pip install --pre --allow-external argparse -U {opts} {packages}
deps=-r{toxinidir}/requirements/default.txt
-r{toxinidir}/requirements/test.txt
commands=nosetests -A 'not acceptance'
commands=nosetests -A 'not acceptance'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment