MCPcopy Create free account
hub / github.com/PyCQA/flake8 / test_import_plugins_extends_sys_path

Function test_import_plugins_extends_sys_path

tests/unit/plugins/finder_test.py:709–727  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

707
708@pytest.mark.usefixtures("reset_sys")
709def test_import_plugins_extends_sys_path():
710 plugin = _plugin(ep=_ep(value="aplugin:ExtensionTestPlugin2"))
711
712 opts = finder.PluginOptions(
713 local_plugin_paths=("tests/integration/subdir",),
714 enable_extensions=frozenset(),
715 require_plugins=frozenset(),
716 )
717 ret = finder._import_plugins([plugin], opts)
718
719 import aplugin
720
721 assert ret == [
722 finder.LoadedPlugin(
723 plugin,
724 aplugin.ExtensionTestPlugin2,
725 {"tree": True},
726 ),
727 ]
728
729
730def test_classify_plugins():

Callers

nothing calls this directly

Calls 2

_epFunction · 0.85
_pluginFunction · 0.70

Tested by

no test coverage detected