kislyuk / argcomplete

Python and tab completion, better together.
https://kislyuk.github.io/argcomplete/
Apache License 2.0
1.39k stars 129 forks source link

Add debug_stream argument #395

Closed azjps closed 1 year ago

azjps commented 1 year ago

Allow debug_stream to be optionally set in CompletionFinder.__call__(). By default, this is still set to os.fdopen(9), but now it can be overridden to a different i/o stream instead. May be useful for unit tests, especially as os.fdopen(9) is likely to conflict with pytest plugins and lead to obscure errors (which was happening in the pytest suite for ipython/traitlets#811).

Closes #393