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:
parent
b8aae428e5
commit
1edb47ad5b
2 changed files with 4 additions and 3 deletions
|
|
@ -278,7 +278,7 @@ def test_notebook(ipynb):
|
||||||
print("output length mismatch (expected {}, got {})".format(
|
print("output length mismatch (expected {}, got {})".format(
|
||||||
len(cell.outputs), len(outs)))
|
len(cell.outputs), len(outs)))
|
||||||
failed = True
|
failed = True
|
||||||
if not compare_outputs(outs, cell.outputs):
|
if not compare_outputs(cell.outputs, outs):
|
||||||
failed = True
|
failed = True
|
||||||
print("cell %d: " % i, end="")
|
print("cell %d: " % i, end="")
|
||||||
if failed:
|
if failed:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (C) 2010, 2011, 2014, 2015, 2016 Laboratoire de Recherche et
|
# Copyright (C) 2010, 2011, 2014-2016, 2018 Laboratoire de Recherche
|
||||||
# Developpement de l'EPITA (LRDE).
|
# et Developpement de l'EPITA (LRDE).
|
||||||
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6
|
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6
|
||||||
# (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
# (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
||||||
# Pierre et Marie Curie.
|
# Pierre et Marie Curie.
|
||||||
|
|
@ -92,6 +92,7 @@ export srcdir
|
||||||
case $1 in
|
case $1 in
|
||||||
*.ipynb)
|
*.ipynb)
|
||||||
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath \
|
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath \
|
||||||
|
PYTHONIOENCODING=utf-8:surrogateescape \
|
||||||
exec $PREFIXCMD @PYTHON@ @abs_srcdir@/python/ipnbdoctest.py "$@";;
|
exec $PREFIXCMD @PYTHON@ @abs_srcdir@/python/ipnbdoctest.py "$@";;
|
||||||
*.py)
|
*.py)
|
||||||
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath \
|
PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue