-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,6 +134,7 @@ pvremove | |
pvs | ||
pvscan | ||
pxz | ||
py.test-[23] | ||
pydoc3 | ||
python2 | ||
python3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# bash completion for py.test(1) -*- shell-script -*- | ||
|
||
_py_test() | ||
{ | ||
local cur prev words cword split | ||
_init_completion -s || return | ||
|
||
case $prev in | ||
-h|--help|-k|-m|--maxfail|-r|--report|--junit-prefix|--doctest-glob|-p) | ||
return | ||
;; | ||
--import-mode) | ||
COMPREPLY=( $( compgen -W "prepend append" -- "$cur" ) ) | ||
return | ||
;; | ||
--capture) | ||
COMPREPLY=( $( compgen -W "fd sys no" -- "$cur" ) ) | ||
return | ||
;; | ||
--tb) | ||
COMPREPLY=( $( compgen -W "auto long short line native no" \ | ||
-- "$cur" ) ) | ||
return | ||
;; | ||
--color) | ||
COMPREPLY=( $( compgen -W "yes no auto" -- "$cur" ) ) | ||
return | ||
;; | ||
--pastebin) | ||
COMPREPLY=( $( compgen -W "failed all" -- "$cur" ) ) | ||
return | ||
;; | ||
--junit-xml) | ||
_filedir xml | ||
return | ||
;; | ||
--result-log) | ||
_filedir log | ||
return | ||
;; | ||
--ignore) | ||
_filedir | ||
return | ||
;; | ||
--confcutdir|--basetemp) | ||
_filedir -d | ||
return | ||
;; | ||
--assert) | ||
COMPREPLY=( $( compgen -W "plain reinterp rewrite" -- "$cur" ) ) | ||
return | ||
;; | ||
--genscript) | ||
_filedir py | ||
return | ||
;; | ||
esac | ||
|
||
$split && return | ||
|
||
if [[ "$cur" == -* ]]; then | ||
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) | ||
[[ $COMPREPLY == *= ]] && compopt -o nospace | ||
return | ||
fi | ||
|
||
_filedir py | ||
} && | ||
complete -F _py_test py.test py.test-2 py.test-3 | ||
|
||
# ex: filetype=sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
assert_source_completions py.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
proc setup {} { | ||
save_env | ||
} | ||
|
||
|
||
proc teardown {} { | ||
assert_env_unmodified | ||
} | ||
|
||
|
||
setup | ||
|
||
|
||
assert_complete_any "py.test " | ||
sync_after_int | ||
|
||
assert_complete_any "py.test -" | ||
sync_after_int | ||
|
||
|
||
teardown |