File: shims.bats

package info (click to toggle)
pyenv 2.6.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,496 kB
  • sloc: sh: 4,914; python: 410; makefile: 161; ansic: 60
file content (29 lines) | stat: -rw-r--r-- 579 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bats

load test_helper

@test "no shims" {
  run pyenv-shims
  assert_success
  assert [ -z "$output" ]
}

@test "shims" {
  mkdir -p "${PYENV_ROOT}/shims"
  touch "${PYENV_ROOT}/shims/python"
  touch "${PYENV_ROOT}/shims/irb"
  run pyenv-shims
  assert_success
  assert_line "${PYENV_ROOT}/shims/python"
  assert_line "${PYENV_ROOT}/shims/irb"
}

@test "shims --short" {
  mkdir -p "${PYENV_ROOT}/shims"
  touch "${PYENV_ROOT}/shims/python"
  touch "${PYENV_ROOT}/shims/irb"
  run pyenv-shims --short
  assert_success
  assert_line "irb"
  assert_line "python"
}