File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 3
3
import re
4
4
import sys
5
5
from functools import partial
6
+ from pathlib import Path
6
7
from typing import Callable
7
8
8
9
import pytest
@@ -458,7 +459,9 @@ def test_load_plugins_from_entry_points(mocked_entry_points: None) -> None:
458
459
}
459
460
460
461
461
- def test_install_plugin (test_plugin_package_req : str ) -> None :
462
+ def test_plugin_in_venv (test_plugin_package_req : str ) -> None :
463
+ from build .env import DefaultIsolatedEnv
464
+
462
465
variant_info = VariantInfo (
463
466
namespace_priorities = ["installable_plugin" ],
464
467
providers = {
@@ -469,8 +472,12 @@ def test_install_plugin(test_plugin_package_req: str) -> None:
469
472
},
470
473
)
471
474
472
- with PluginLoader (variant_info , use_auto_install = True , isolated = True ) as loader :
473
- assert set (loader .namespaces ) == {"installable_plugin" }
475
+ with DefaultIsolatedEnv () as venv :
476
+ venv .install ([test_plugin_package_req ])
477
+ with PluginLoader (
478
+ variant_info , use_auto_install = False , venv_path = Path (venv .path )
479
+ ) as loader :
480
+ assert set (loader .namespaces ) == {"installable_plugin" }
474
481
475
482
476
483
def test_no_plugin_api (test_plugin_package_req : str ) -> None :
You can’t perform that action at this time.
0 commit comments