kovidgoyal/kitty · error
Unknown test type: %s
Error message
Unknown test type: %s
What it means
kitten's internal pytest helper dispatches on args[0] and only recognizes specific test types (read, etc.). Any other first argument yields this error with exit code 1.
Source
Thrown at tools/cmd/pytest/main.go:20
package pytest
import (
"fmt"
"io"
"os"
"github.com/kovidgoyal/go-shm"
"github.com/kovidgoyal/kitty/kittens/ssh"
"github.com/kovidgoyal/kitty/tools/cli"
)
var _ = fmt.Print
func test_integration_with_python(args []string) (rc int, err error) {
switch args[0] {
default:
return 1, fmt.Errorf("Unknown test type: %s", args[0])
case "read":
data, err := shm.ReadWithSizeAndUnlink(args[1])
if err != nil {
return 1, err
}
_, err = os.Stdout.Write(data)
if err != nil {
return 1, err
}
case "write":
data, err := io.ReadAll(os.Stdin)
if err != nil {
return 1, err
}
mmap, err := shm.CreateTemp("shmtest-", uint64(len(data)+shm.NUM_BYTES_FOR_SIZE))
if err != nil {
return 1, err
}View on GitHub (pinned to 6d5d0c4406)
Solutions
- Do not invoke this internal command directly; it exists for kitty's own test suite
- If writing kitty integration tests, use only the documented test types in the switch (e.g. read)
- Update to a matching kitty source tree if test harness and binary versions diverged
Defensive patterns
Strategy: validation
Validate before calling
known := map[string]bool{"read": true}
if !known[args[0]] { return 1, fmt.Errorf("unsupported test type %q", args[0]) } Prevention
- Treat this command as kitty-internal; don't call it from user code
- Keep test harness and kitty binary from the same source tree
When it happens
Trigger: Invoking the hidden pytest integration command with an unrecognized subcommand token, e.g. `kitten pytest foo ...` where foo is not in the switch.
Common situations: This is an internal testing shim for kitty's Python integration tests; end users normally never call it — hitting it means an internal test harness was invoked with a wrong or outdated test type name.
Related errors
- %d out of %d tests failed.
- Failed to unmap history buffer segment: %s
- Incomplete signal read from signalfd
- This must be run as kitten ask
- This should be run as kitten broadcast
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/700ff9d8e3bb8622.
Report an issue: GitHub.