From 9962f8cb3960d1fff99d84b5753d288cc4ac48b8 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Mon, 10 Aug 2026 20:31:00 +0300 Subject: [PATCH] pyenv-binary-package: refactor tests * make them more human-readable * don't double-test external code outside of integration tests --- plugins/pyenv-binary/test/package.bats | 36 ++++++++++++++++---------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/plugins/pyenv-binary/test/package.bats b/plugins/pyenv-binary/test/package.bats index b3f2f6dc..b954fa6d 100644 --- a/plugins/pyenv-binary/test/package.bats +++ b/plugins/pyenv-binary/test/package.bats @@ -24,17 +24,15 @@ stub_build_environment() { done } -@test "completion lists the option and definitions provided by another plugin" { - mkdir -p "${PYENV_ROOT}/plugins/example/share/python-build" - touch "${PYENV_ROOT}/plugins/example/share/python-build/3.12.7-example" - PATH="${BATS_TEST_DIRNAME}/../../python-build/bin:${PATH}" +@test "completions" { + create_stub pyenv-install 'echo "${0##*/} $*"' run pyenv-binary-package --complete - assert_success - assert_line "--archive-base-url" - assert_line "--verbose" - assert_line "3.12.7-example" - refute_line "Available versions:" + assert_success <