python: fix error handling while reading automata

* wrap/python/tests/run.in: Make it easier to run python with gdb.
* wrap/python/tests/automata-io.ipynb: Add test case.
* wrap/python/spot.py (spot.automata): Make sure p is defined in all
cases.
* src/hoaparse/hoascan.ll: Make sure we do not close a file that
hasn't been opened.
This commit is contained in:
Alexandre Duret-Lutz 2015-04-13 16:39:19 +02:00
parent a637e23d84
commit ab7ee2c460
4 changed files with 81 additions and 12 deletions

View file

@ -41,13 +41,15 @@ test -z "$1" &&
case $1 in
*.ipynb)
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath \
exec @PYTHON@ @srcdir@/ipnbdoctest.py "$@";;
exec $PREFIXCMD @PYTHON@ @srcdir@/ipnbdoctest.py "$@";;
*.py)
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath exec @PYTHON@ "$@";;
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath \
exec $PREFIXCMD @PYTHON@ "$@";;
*.test)
exec sh -x "$@";;
*python*)
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath exec "$@";;
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath \
exec $PREFIXCMD "$@";;
*)
echo "Unknown extension" >&2
exit 2;;