Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MBPs-MacBook-Pro:pyenv rhemon$ bats test
- ✓ default version
- ✓ doesn't read version from non-pyenv repo
- ✓ reads version from git repo
- ✓ prints default version if no tags in git repo
- ✓ commands
- ✓ commands --sh
- ✓ commands in path with spaces
- ✓ commands --no-sh
- ✓ command with no completion support
- ✓ command with completion support
- ✓ forwards extra arguments
- ✓ fails with invalid version
- ✓ fails with invalid version set from file
- ✓ completes with names of executables
- ✓ carries original IFS within hooks
- ✓ forwards all arguments
- ✓ supports python -S <cmd>
- ✓ default
- ✓ read PYENV_ROOT/version
- ✓ set PYENV_ROOT/version
- ✓ fail setting invalid PYENV_ROOT/version
- ✓ without args shows summary of common commands
- ✓ invalid command
- ✓ shows help for a specific command
- ✓ replaces missing extended help with summary text
- ✓ extracts only usage
- ✓ multiline usage section
- ✓ multiline extended help section
- ✓ prints usage help given no argument
- ✓ prints list of hooks
- ✓ supports hook paths with spaces
- ✓ resolves relative paths
- ✓ resolves symlinks
- ✓ creates shims and versions directories
- ✓ auto rehash
- ✓ setup shell completions
- ✓ detect parent shell
- ✓ detect parent shell from script
- ✓ setup shell completions (fish)
- ✓ fish instructions
- ✓ option to skip rehash
- ✓ adds shims to PATH
- ✓ adds shims to PATH (fish)
- ✓ can add shims to PATH more than once
- ✓ can add shims to PATH more than once (fish)
- ✓ outputs sh-compatible syntax
- ✓ outputs fish-specific syntax (fish)
- ✓ no version
- ✓ local version
- ✓ discovers version file in parent directory
- ✓ ignores PYENV_DIR
- ✓ sets local version
- ✓ changes local version
- ✓ unsets local version
- ✓ prefix
- ✓ prefix for invalid version
- ✓ prefix for system
- ✓ prefix for system in /
- ✓ prefix for system in /
- ✓ prefix for invalid system
- ✓ blank invocation
- ✓ invalid command
- ✓ default PYENV_ROOT
- ✓ inherited PYENV_ROOT
- ✓ default PYENV_DIR
- ✓ inherited PYENV_DIR
- ✓ invalid PYENV_DIR
- ✓ adds its own libexec to PATH
- ✓ adds plugin bin dirs to PATH
- ✓ PYENV_HOOK_PATH preserves value from environment
- ✓ PYENV_HOOK_PATH includes pyenv built-in plugins
- ✓ prefixes
- ✓ should use dirname of file argument as PYENV_DIR
- ✓ should follow symlink of file argument (#379, #404)
- ✓ empty rehash
- ✓ non-writable shims directory
- ✓ rehash in progress
- ✓ creates shims
- ✓ removes stale shims
- ✓ binary install locations containing spaces
- ✓ carries original IFS within hooks
- ✓ sh-rehash in bash
- ✓ sh-rehash in fish
- ✓ no shell version
- ✓ shell version
- ✓ shell version (fish)
- ✓ shell unset
- ✓ shell unset (fish)
- ✓ shell change invalid version
- ✓ shell change version
- ✓ shell change version (fish)
- ✓ no shims
- ✓ shims
- ✓ shims --short
- ✓ fails without arguments
- ✓ fails for invalid file
- ✓ fails for blank file
- ✓ reads simple version file
- ✓ ignores leading spaces
- ✗ reads only the first word from file
- (from function `assert_equal' in file test/test_helper.bash, line 65,
- from function `assert_output' in file test/test_helper.bash, line 74,
- from function `assert_success' in file test/test_helper.bash, line 49,
- in test file test/version-file-read.bats, line 41)
- `assert_success "3.3.5"' failed
- expected: 3.3.5
- actual: 3.3.5:2.7.6:hi
- ✗ loads *not* only the first line in file
- (from function `assert_equal' in file test/test_helper.bash, line 65,
- from function `assert_output' in file test/test_helper.bash, line 74,
- from function `assert_success' in file test/test_helper.bash, line 49,
- in test file test/version-file-read.bats, line 50)
- `assert_success "2.7.6:3.3.5"' failed
- expected: 2.7.6:3.3.5
- actual: 2.7.6:one:3.3.5:two
- ✓ ignores leading blank lines
- ✓ handles the file with no trailing newline
- ✓ ignores carriage returns
- ✓ invocation without 2 arguments prints usage
- ✓ setting nonexistent version fails
- ✓ writes value to arbitrary file
- ✓ detects global 'version' file
- ✓ prints global file if no version files exist
- ✓ in current directory
- ✓ in parent directory
- ✓ topmost file has precedence
- ✓ PYENV_DIR has precedence over PWD
- ✓ PWD is searched if PYENV_DIR yields no results
- ✓ finds version file in target directory
- ✓ fails when no version file in target directory
- ✓ no version selected
- ✓ system version is not checked for existence
- ✓ PYENV_VERSION can be overridden by hook
- ✓ carries original IFS within hooks
- ✓ PYENV_VERSION has precedence over local
- ✓ local file has precedence over global
- ✓ missing version
- ✓ one missing version (second missing)
- ✓ one missing version (first missing)
- ✓ one missing version (without stderr)
- ✓ version with prefix in name
- ✓ reports global file even if it doesn't exist
- ✓ detects global file
- ✓ detects PYENV_VERSION
- ✓ detects local file
- ✓ reports from hook
- ✓ carries original IFS within hooks
- ✓ doesn't inherit PYENV_VERSION_ORIGIN from environment
- ✓ no version selected
- ✓ set by PYENV_VERSION
- ✓ set by local file
- ✓ set by global file
- ✓ set by PYENV_VERSION, one missing
- ✓ set by PYENV_VERSION, two missing
- ✓ set by PYENV_VERSION, one missing (stderr filtered)
- ✓ no versions installed
- ✓ not even system python available
- ✓ bare output no versions installed
- ✓ single version installed
- ✓ single version bare
- ✓ multiple versions
- ✓ indicates current version
- ✓ bare doesn't indicate current version
- ✓ globally selected version
- ✓ per-project version
- ✓ ignores non-directories under versions
- ✓ lists symlinks under versions
- ✓ doesn't list symlink aliases when --skip-aliases
- ✓ finds versions where present
- ✓ outputs path to executable
- ✓ searches PATH for system version
- ✓ searches PATH for system version (shims prepended)
- ✓ searches PATH for system version (shims appended)
- ✓ searches PATH for system version (shims spread)
- ✓ doesn't include current directory in PATH search
- ✓ version not installed
- ✓ versions not installed
- ✓ no executable found
- ✓ no executable found for system version
- ✓ executable found in other versions
- ✓ carries original IFS within hooks
- ✓ discovers version from pyenv-version-name
- 168 tests, 2 failures
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement