prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Test `test_pathcompleter_can_expanduser` fails on NixOS

Open
#1,657 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

On latest NixOS (22.05) when trying to test prompt-toolkit version 3.0.30 I get following error:

______________________ test_pathcompleter_can_expanduser _______________________

    def test_pathcompleter_can_expanduser():
        completer = PathCompleter(expanduser=True)
        doc_text = "~"
        doc = Document(doc_text, len(doc_text))
        event = CompleteEvent()
        completions = list(completer.get_completions(doc, event))
>       assert len(completions) > 0
E       assert 0 > 0
E        +  where 0 = len([])

tests/test_completion.py:206: AssertionError

Unfortunately I have no clue yet what causes this issue.

Best regards
Jonas

Contributor guide

No contributing guide indexed for this repository

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 tests/test_completion.py and the test_pathcompleter_can_expanduser failure shown in the report. Trace PathCompleter with expanduser=True for the '~' document on NixOS and compare its behavior with the expected completion path. Done means the test produces completions on NixOS and the existing completion behavior remains covered by the test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.