Skip to content

Commit

Permalink
Back out of reading pyvenv.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
layday committed Mar 6, 2024
1 parent 77bf09d commit b45d04e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_env.py
Expand Up @@ -230,19 +230,19 @@ def test_uv_impl_install_cmd_well_formed(


@pytest.mark.parametrize(
('env_impl', 'pyvenv_key'),
('env_impl', 'backend_cls'),
[
('virtualenv', 'virtualenv'),
('uv', 'uv'),
('venv', build.env._VenvImplBackend),
('virtualenv', build.env._VirtualenvImplBackend),
('uv', build.env._UvImplBackend),
],
)
def test_venv_creation(
env_impl: build.env.EnvImpl,
pyvenv_key: str,
backend_cls: build.env._EnvImplBackend,
):
with build.env.DefaultIsolatedEnv(env_impl) as env:
with Path(env.path, 'pyvenv.cfg').open(encoding='utf-8') as pyvenv_cfg:
next(h.rstrip() == pyvenv_key for i in pyvenv_cfg for (h, *_) in (i.partition('='),))
assert type(env._env_impl_backend) is backend_cls


@pytest.mark.network
Expand Down

0 comments on commit b45d04e

Please sign in to comment.