nushell / nushell/reedline

Impossible testing with pexpect

Open
#594 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Events bug
Dominant language
Rust
Stars
818
Forks
249
Avg merge
4d 14h
Merged PRs (30d)
30

Description

Platform linux
Terminal software pseudo terminal - python pty

I'm trying to write integration tests of reedline app with python pexpect lib, and, unfortunately, it's fail. Looks like problem in crossterm, but I'm not sure.

Steps to reproduce

This can be reproduced on basic example:

>>> import pexpect
>>> proc = pexpect.spawn("./target/debug/examples/basic")
>>> print(proc.readline())
b'\x1b[6nError: Custom { kind: Other, error: "The cursor position could not be read within a normal duration" }\r\n'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the basic example launched as ./target/debug/examples/basic and reproduce the failure through Python pexpect on Linux. Trace the crossterm cursor-position read that emits the timeout error. Done means the basic example can be spawned through pexpect without the cursor-position failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
cli, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.