✅ Extend completion unit tests for zsh, powershell and pwsh (#1767)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Aditya Raj · committed by GitHub · parent 4e39eb7 · Browse files · 1 file·+18 added−0 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Co-authored-by: svlandeg <sofie.vanlandeghem@gmail.com>
Diff stats
1 file+18 added−0 removed
- tests:+18 added−0 removed
Provenance
- Commit
b712d8e- Tree
e498c4f- Author
Aditya Raj <147165909+ADiTyaRaj8969@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
4e39eb7
1 file changed+18 added−0 removed
modified:tests/test_completion/test_completion_option_colon.py+18 added
76 unmodified lines77 "_TYPER_COMPLETE_ARGS": "colon_example.py --name ",78 },79 )80 assert "alpine\\\\:hello" in result.stdout81+ assert "fake image\\\\: for testing" in result.stdout82 assert "alpine\\\\:latest" in result.stdout83+ assert "latest alpine image" in result.stdout84 assert "nvidia/cuda\\\\:10.0-devel-ubuntu18.04" in result.stdout85 86 87 def test_completion_colon_zsh_partial():7 unmodified lines95 "_TYPER_COMPLETE_ARGS": "colon_example.py --name alpine",96 },97 )98 assert "alpine\\\\:hello" in result.stdout99+ assert "fake image\\\\: for testing" in result.stdout100 assert "alpine\\\\:latest" in result.stdout101+ assert "latest alpine image" in result.stdout102 assert "nvidia/cuda\\\\:10.0-devel-ubuntu18.04" not in result.stdout103 104 105 def test_completion_colon_zsh_single():7 unmodified lines113 "_TYPER_COMPLETE_ARGS": "colon_example.py --name alpine:hell",114 },115 )116 assert "alpine\\\\:hello" in result.stdout117+ assert "fake image\\\\: for testing" in result.stdout118 assert "alpine\\\\:latest" not in result.stdout119+ assert "latest alpine image" not in result.stdout120 assert "nvidia/cuda\\\\:10.0-devel-ubuntu18.04" not in result.stdout121 122 123 def test_completion_colon_powershell_all():8 unmodified lines132 "_TYPER_COMPLETE_WORD_TO_COMPLETE": "",133 },134 )135 assert "alpine:hello" in result.stdout136+ assert "fake image: for testing" in result.stdout137 assert "alpine:latest" in result.stdout138+ assert "latest alpine image" in result.stdout139 assert "nvidia/cuda:10.0-devel-ubuntu18.04" in result.stdout140 141 142 def test_completion_colon_powershell_partial():8 unmodified lines151 "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine",152 },153 )154 assert "alpine:hello" in result.stdout155+ assert "fake image: for testing" in result.stdout156 assert "alpine:latest" in result.stdout157+ assert "latest alpine image" in result.stdout158 assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout159 160 161 def test_completion_colon_powershell_single():8 unmodified lines170 "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine:hell",171 },172 )173 assert "alpine:hello" in result.stdout174+ assert "fake image: for testing" in result.stdout175 assert "alpine:latest" not in result.stdout176+ assert "latest alpine image" not in result.stdout177 assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout178 179 180 def test_completion_colon_pwsh_all():8 unmodified lines189 },190 )191 192 assert "alpine:hello" in result.stdout193+ assert "fake image: for testing" in result.stdout194 assert "alpine:latest" in result.stdout195+ assert "latest alpine image" in result.stdout196 assert "nvidia/cuda:10.0-devel-ubuntu18.04" in result.stdout197 198 199 def test_completion_colon_pwsh_partial():8 unmodified lines208 "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine",209 },210 )211 assert "alpine:hello" in result.stdout212+ assert "fake image: for testing" in result.stdout213 assert "alpine:latest" in result.stdout214+ assert "latest alpine image" in result.stdout215 assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout216 217 218 def test_completion_colon_pwsh_single():8 unmodified lines227 "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine:hell",228 },229 )230 assert "alpine:hello" in result.stdout231+ assert "fake image: for testing" in result.stdout232 assert "alpine:latest" not in result.stdout233+ assert "latest alpine image" not in result.stdout234 assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout235 236 237 # TODO: tests for complete_fish