Skip to content

Add regression test for uv#22537 - #2622

Draft
astral-automations-bot[bot] wants to merge 1 commit into
mainfrom
automations/reproduce-bug/22537
Draft

astral-automations-bot[bot] wants to merge 1 commit into
mainfrom
automations/reproduce-bug/22537

Conversation

@astral-automations-bot

Copy link
Copy Markdown

Add a minimal integration test that reproduces astral-sh#22537.

@astral-automations-bot astral-automations-bot Bot added internal A refactor or improvement that is not user-facing internal:testing Internal testing of behavior labels Oct 14, 2026
charliermarsh pushed a commit to astral-sh/uv that referenced this pull request Oct 14, 2026
- Fix venv activation command for ksh shell in
`crates/uv/src/commands/venv.rs`

- Add `create_venv_ksh` test in `crates/uv/tests/python/venv.rs` to
create venv with `ksh` shell

Code for test from 2 PRs created by astral-automations-bot:
- astral-sh/pull/2622
- astral-sh/pull/2623

Fix #22537

---
Tests OK for `venv` with `cargo nextest`:
```sh
$ cargo nextest run -E 'test(venv::create_venv_ksh)'
(...)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 45.10s
  SETUP PASS [   0.009s] setup-hook-unix: scripts/nextest-setup-hook-unix.sh
        PASS [   0.992s] uv::python venv::create_venv_ksh
────────────
     Summary [   1.014s] 1 test run: 1 passed, 5413 skipped

$ cargo nextest run -E 'test(venv::)'
(...)
        PASS [   3.232s] uv::python venv::seed
        PASS [   1.408s] uv::python venv::virtual_dependency_group
        PASS [   1.336s] uv::python venv::virtual_empty
        PASS [   5.201s] uv::python venv::seed_keeps_distutils_patch_on_py39
        PASS [   5.100s] uv::python venv::seed_older_python_version
        PASS [   5.481s] uv::python venv::seed_skips_distutils_patch_on_py310
────────────
     Summary [  17.187s] 61 tests run: 61 passed, 5353 skipped
```

---

Tested on OpenBSD with `ksh` and `bash` shell for venv creation =>
output for activation command.

- bash shell
```sh
$ echo $SHELL
/usr/local/bin/bash

$ uv venv venv-bash
Using CPython 3.14.8 interpreter at: /usr/local/bin/python
Creating virtual environment at: venv-bash
Activate with: source venv-bash/bin/activate
```
- ksh shell
```sh
openbsd-dev$ echo $SHELL
/bin/ksh

openbsd-dev$ uv venv venv-ksh
Using CPython 3.14.8 interpreter at: /usr/local/bin/python
Creating virtual environment at: venv-ksh
Activate with: . venv-ksh/bin/activate
```

---------

Signed-off-by: Laurent Cheylus <[email protected]>

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal:testing Internal testing of behavior internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants