nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 397 forks source link

Add deep tab autocompletion to the nosetests command #675

Open mgaitan opened 11 years ago

mgaitan commented 11 years ago

nosetests can run specific tests with a very flexible syntax described in [1]

The usefulness of this feature is limited because you can't autocomplete further than the module namespace, which is done by the underlying bash/shell autocopletion. After ":" we are in a "python namespace" and the shell can't introspect there.

However, popular shells like Bash and Zsh support autocompletion ([2] [3]) to be extended and we could use them to this purpose.

There is a working implementation for bash here:

https://github.com/machinalis/django-test-autocomplete

but this could be generalized and integrated into nosetests.

[1] https://nose.readthedocs.org/en/latest/usage.html#selecting-tests [2] http://bash-completion.alioth.debian.org/ [3] http://zsh.sourceforge.net/Doc/Release/Completion-System.html

esc commented 10 years ago

@mgaitan how about: https://github.com/alonho/nosecomplete

mgaitan commented 10 years ago

On Wed, Apr 9, 2014 at 6:17 AM, Valentin Haenel notifications@github.comwrote:

https://github.com/alonho/nosecomplete

yeah! that awesome. I think we could close this refering that plugin.

cheers

mgaitan.github.io textosyprextextos.com.ar

esc commented 10 years ago

I would agree

esc commented 10 years ago

Yeah, it works fairly well, wouldn't mind having some completion for the options in zsh though.