Update our plugin registration for debugging

This allows us to report whether or not a plugin is local when users
provide `flake8 --bug-report` output.
This commit is contained in:
Ian Stapleton Cordasco 2017-08-08 08:54:40 -05:00
parent d5dfd1180d
commit 156f90369f
No known key found for this signature in database
GPG key ID: C9D7A2604B4FCB2A
6 changed files with 65 additions and 48 deletions

View file

@ -111,17 +111,6 @@ def test_version_proxies_to_the_plugin():
assert plugin.version == 'a.b.c'
def test_local_plugin_version():
"""Verify that local plugins have [local] appended to version."""
entry_point = mock.Mock(spec=['require', 'resolve', 'load'])
plugin_obj = mock.Mock(spec_set=['version'])
plugin_obj.version = 'a.b.c'
plugin = manager.Plugin('T000', entry_point, local=True)
plugin._plugin = plugin_obj
assert plugin.version == 'a.b.c [local]'
def test_register_options():
"""Verify we call add_options on the plugin only if it exists."""
# Set up our mocks and Plugin object