fix two issues related to jupyter notebook execution

* tests/python/ipnbdoctest.py: Invert diffs inputs.
* tests/run.in: Run notebooks with
PYTHONIOENCODING=utf-8:surrogateescape to avoid exceptions when trying
to display utf-8 characters on ascii terminals.
This commit is contained in:
Alexandre Duret-Lutz 2018-07-11 15:43:01 +02:00
parent d941b9e176
commit 6875284f94
2 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2010, 2011, 2014, 2015, 2016 Laboratoire de Recherche et
# Developpement de l'EPITA (LRDE).
# Copyright (C) 2010, 2011, 2014-2016, 2018 Laboratoire de Recherche
# et Developpement de l'EPITA (LRDE).
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6
# (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
# Pierre et Marie Curie.
@ -92,6 +92,7 @@ export srcdir
case $1 in
*.ipynb)
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath \
PYTHONIOENCODING=utf-8:surrogateescape \
exec $PREFIXCMD @PYTHON@ @abs_srcdir@/python/ipnbdoctest.py "$@";;
*.py)
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath \