mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-09 14:24:17 +00:00
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:
parent
d5dfd1180d
commit
156f90369f
6 changed files with 65 additions and 48 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue