Skip to content

Commit 7c866ab

Browse files
committed
Use test plugin directly in test_no_plugin_api
1 parent f3c00f8 commit 7c866ab

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/plugins/test_loader.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,13 @@ def test_plugin_in_venv(test_plugin_package_req: str) -> None:
480480
assert set(loader.namespaces) == {"installable_plugin"}
481481

482482

483-
def test_no_plugin_api(test_plugin_package_req: str) -> None:
483+
def test_no_plugin_api(
484+
test_artifact_path: Path,
485+
monkeypatch: pytest.MonkeyPatch,
486+
test_plugin_package_req: str,
487+
) -> None:
488+
monkeypatch.setenv("PYTHONPATH", str(test_artifact_path / "test-plugin-package"))
489+
484490
variant_info = VariantInfo(
485491
namespace_priorities=["installable_plugin"],
486492
providers={
@@ -490,7 +496,7 @@ def test_no_plugin_api(test_plugin_package_req: str) -> None:
490496
},
491497
)
492498

493-
with PluginLoader(variant_info, use_auto_install=True, isolated=True) as loader:
499+
with PluginLoader(variant_info, use_auto_install=False) as loader:
494500
assert set(loader.namespaces) == {"installable_plugin"}
495501

496502

0 commit comments

Comments
 (0)