mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 18:56:53 +00:00
Start tests for PluginManager
This commit is contained in:
parent
56a75cc391
commit
6a72e36681
1 changed files with 13 additions and 0 deletions
13
tests/unit/test_plugin_manager.py
Normal file
13
tests/unit/test_plugin_manager.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
"""Tests for flake8.plugins.manager.PluginManager."""
|
||||
import mock
|
||||
|
||||
from flake8.plugins import manager
|
||||
|
||||
|
||||
@mock.patch('pkg_resources.iter_entry_points')
|
||||
def test_calls_pkg_resources_on_instantiation(iter_entry_points):
|
||||
"""Verify that we call iter_entry_points when we create a manager."""
|
||||
iter_entry_points.return_value = []
|
||||
manager.PluginManager(namespace='testing.pkg_resources')
|
||||
|
||||
iter_entry_points.assert_called_once_with('testing.pkg_resources')
|
||||
Loading…
Add table
Add a link
Reference in a new issue