mock npe1 plugin manager too during tests
@@ -467,8 +467,11 @@ def _no_error_reports():
@pytest.fixture(autouse=True)
-def _npe2pm(npe2pm):
+def _npe2pm(npe2pm, monkeypatch):
"""Autouse the npe2 mock plugin manager with no registered plugins."""
+ from napari.plugins import NapariPluginManager
+
+ monkeypatch.setattr(NapariPluginManager, 'discover', lambda *_, **__: None)
return npe2pm
