Merge lp://staging/~dobey/tarmac/home-loader into lp://staging/tarmac

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 417
Merged at revision: 414
Proposed branch: lp://staging/~dobey/tarmac/home-loader
Merge into: lp://staging/tarmac
Diff against target: 455 lines (+174/-104)
14 files modified
tarmac/plugin.py (+21/-13)
tarmac/plugins/tests/test_allowedcontributors.py (+1/-1)
tarmac/plugins/tests/test_bugresolver.py (+1/-1)
tarmac/plugins/tests/test_command.py (+1/-1)
tarmac/plugins/tests/test_commitmessage.py (+1/-1)
tarmac/plugins/tests/test_recipebuilder.py (+1/-1)
tarmac/plugins/tests/test_votes.py (+1/-1)
tarmac/tests/__init__.py (+60/-2)
tarmac/tests/mock.py (+0/-80)
tarmac/tests/plugins/testplugin.py (+23/-0)
tarmac/tests/test_branch.py (+1/-1)
tarmac/tests/test_commands.py (+1/-1)
tarmac/tests/test_plugin.py (+61/-0)
tarmac/tests/test_registry.py (+1/-1)
To merge this branch: bzr merge lp://staging/~dobey/tarmac/home-loader
Reviewer Review Type Date Requested Status
Mike McCracken Approve
Review via email: mp+193472@code.staging.launchpad.net

Commit message

Fix plug-in loading to use execfile() rather than relying on imports.
Remove the mock.py that conflicts namespace with python-mock.
Add tests for the load_plugins code.
Add a plug-in for testing the load_plugins code with.

Description of the change

There are no tests for load_plugins, so I am not 100% certain this actually does what I think it should do, but I think it should do it.

The change here is to use execfile() to load plug-ins, so that one doesn't need an __init__.py everywhere, and all the paths for plug-ins do not need to be added to the Python sys.path.

To post a comment you must log in.
417. By dobey

The new module is deprecated and gone in py3, so use types instead.

Revision history for this message
Mike McCracken (mikemc) wrote :

looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches