File: test_interactive_raw.sh

package info (click to toggle)
python-better-exceptions 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 632 kB
  • sloc: python: 620; sh: 108; makefile: 5
file content (20 lines) | stat: -rwxr-xr-x 382 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash

[ -z "${BETEXC_PYTHON}" ] && export BETEXC_PYTHON=python

/usr/bin/expect -f - <<EOF
spawn ${BETEXC_PYTHON} -m test_util.quiet_console
expect ">>> "
send "import better_exceptions\r"
expect ">>> "
send "def foo(a):\r"
expect "... "
send "    assert a > 10\r"
expect "... "
send "\r"
expect ">>> "
send "foo(1)\r"
expect ">>> "
send "exit()\r"
expect "exit"
EOF