@@ -182,52 +182,73 @@ check: check-lint check-format check-types check-package check-docs check-docs-l
182
182
183
183
# run the tests that require rich not to be installed
184
184
test-no-rich :
185
- @ just run pip uninstall -y rich
186
- @ just run pytest --cov-append -m no_rich
185
+ uv pip uninstall rich
186
+ uv run pytest --cov-append -m no_rich
187
187
188
188
# run the tests that require rich to be installed
189
189
test-rich :
190
- @ just run pytest --cov-append -m rich
191
-
192
- # run all tests and log them
193
- log-tests :
194
- @ just run python -m pytest --collect-only --disable-warnings -q --no-cov | @just run python -c " from pathlib import Path; import sys; Path('./tests/tests.log').unlink(missing_ok=True); open('./tests/tests.log', 'a').close(); open('./tests/all_tests.log', 'w').writelines(sys.stdin)"
190
+ uv run pytest --cov-append -m rich
195
191
196
192
# run all tests
197
193
test-all : test-rich test-no-rich
198
- @ just run pip install colorama
199
- @ just run pytest --cov-append -m " not rich and not no_rich"
200
- @ just run pip uninstall -y colorama
201
- @ just run pytest --cov-append -k test_ctor_params
194
+ uv pip install colorama
195
+ uv run pytest --cov-append -m " not rich and not no_rich"
196
+ uv pip uninstall colorama
197
+ uv run pytest --cov-append -k test_ctor_params
198
+
199
+ _ log-tests :
200
+ uv run pytest --collect-only --disable-warnings -q --no-cov
201
+
202
+ # run all tests and log them
203
+ [script ]
204
+ log-tests :
205
+ from pathlib import Path
206
+ import sys
207
+ Path(' ./tests/tests.log' ).unlink(missing_ok=True)
208
+ open(' ./tests/tests.log' , ' a' ).close()
209
+ open(' ./tests/all_tests.log' , ' w' ).writelines(sys.stdin)
202
210
203
211
# run the tests and report if any were not run - sanity check
212
+ [script ]
204
213
list-missed-tests : install log-tests test-all
205
- @ just run python ./ tests/ missed_tests.py
214
+ import sys
215
+ from pathlib import Path
216
+ test_log = Path(__file__).parent / " tests.log"
217
+ all_tests = Path(__file__).parent / " all_tests.log"
218
+ assert test_log.is_file() and all_tests.is_file()
219
+
220
+ tests_run = set(test_log.read_text().splitlines())
221
+ all_tests = set(all_tests.read_text().splitlines()[0:-2])
222
+ if tests_run != all_tests:
223
+ print(" Not all tests were run:" , file=sys.stderr)
224
+ for test in all_tests - tests_run:
225
+ print(test, file=sys.stderr)
226
+ sys.exit(1 )
206
227
207
228
# test bash shell completions
208
229
[script (" bash" )]
209
230
test-bash :
210
- @ just run pytest --cov-append tests/ shellcompletion/ test_shell_resolution.py::TestShellResolution::test_bash tests/ test_parser_completers.py tests/ shellcompletion/ test_bash.py
231
+ uv run pytest --cov-append tests/ shellcompletion/ test_shell_resolution.py::TestShellResolution::test_bash tests/ test_parser_completers.py tests/ shellcompletion/ test_bash.py
211
232
212
233
# test zsh shell completions
213
234
[script (" zsh" )]
214
235
test-zsh :
215
- @ just run pytest --cov-append tests/ shellcompletion/ test_shell_resolution.py::TestShellResolution::test_zsh tests/ test_parser_completers.py tests/ shellcompletion/ test_zsh.py
236
+ uv run pytest --cov-append tests/ shellcompletion/ test_shell_resolution.py::TestShellResolution::test_zsh tests/ test_parser_completers.py tests/ shellcompletion/ test_zsh.py
216
237
217
238
# test powershell shell completions
218
239
[script (" powershell" )]
219
240
test-powershell :
220
- @ just run pytest --cov-append tests/ shellcompletion/ test_shell_resolution.py::TestShellResolution::test_powershell tests/ test_parser_completers.py tests/ test_parser_completers.py tests/ shellcompletion/ test_powershell.py::PowerShellTests tests/ shellcompletion/ test_powershell.py::PowerShellExeTests
241
+ uv run pytest --cov-append tests/ shellcompletion/ test_shell_resolution.py::TestShellResolution::test_powershell tests/ test_parser_completers.py tests/ test_parser_completers.py tests/ shellcompletion/ test_powershell.py::PowerShellTests tests/ shellcompletion/ test_powershell.py::PowerShellExeTests
221
242
222
243
# test pwsh shell completions
223
244
[script (" pwsh" )]
224
245
test-pwsh :
225
- @ just run pytest --cov-append tests/ shellcompletion/ test_shell_resolution.py::TestShellResolution::test_pwsh tests/ test_parser_completers.py tests/ shellcompletion/ test_powershell.py::PWSHTests tests/ shellcompletion/ test_powershell.py::PWSHExeTests
246
+ uv run pytest --cov-append tests/ shellcompletion/ test_shell_resolution.py::TestShellResolution::test_pwsh tests/ test_parser_completers.py tests/ shellcompletion/ test_powershell.py::PWSHTests tests/ shellcompletion/ test_powershell.py::PWSHExeTests
226
247
227
248
# test fish shell completions
228
249
[script (" fish" )]
229
250
test-fish :
230
- @ just run pytest --cov-append tests/ shellcompletion/ test_shell_resolution.py::TestShellResolution::test_fish tests/ test_parser_completers.py tests/ shellcompletion/ test_fish.py
251
+ uv run pytest --cov-append tests/ shellcompletion/ test_shell_resolution.py::TestShellResolution::test_fish tests/ test_parser_completers.py tests/ shellcompletion/ test_fish.py
231
252
232
253
# run tests
233
254
test * TESTS :
0 commit comments