| 707 | |
| 708 | @pytest.mark.usefixtures("reset_sys") |
| 709 | def 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 | |
| 730 | def test_classify_plugins(): |