From df44d53528e9a69b9780baaba31c9798b87c92db Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Fri, 16 Nov 2018 18:16:26 -0600 Subject: [PATCH] Tests work on Travis --- .travis.yml | 7 +++++-- test/jupyter-test.el | 15 +++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9cd7012..f956be7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,10 +33,13 @@ before_install: install: - sudo apt-get install -y python3 python3-pip - sudo pip3 install --upgrade setuptools pip - - sudo pip3 install jupyter + # --ignore-installed six since jupyter tries to upgrade it, but it can't be + # ugraded since it is a distutils package + - sudo pip3 install --ignore-installed six jupyter # Install the kernelspec using the right python. Jupyter installs a default # python kernelspec that uses "python" for the command in - # /usr/local/share/jupyter + # /usr/local/share/jupyter. This installs one with an absolute path using our + # python3 - sudo python3 -m ipykernel.kernelspec - cd $TRAVIS_BUILD_DIR - make dev diff --git a/test/jupyter-test.el b/test/jupyter-test.el index 77a9f81..36a8233 100644 --- a/test/jupyter-test.el +++ b/test/jupyter-test.el @@ -960,15 +960,14 @@ HTML('link')")) (locate-library "jupyter"))) (org-babel-jupyter-resource-directory "./") (file (expand-file-name "jupyter.png")) - (line-breaks - ;; Implementation details of binascii.b2a_base64 (what - ;; IPython uses to encode images) have changed after - ;; python 3.7 it seems. + (py-version (with-current-buffer repl-buffer - (not - (version< - (jupyter-test-kernel-version - (oref (oref jupyter-current-client manager) spec)) "3.7")))) + (jupyter-test-kernel-version + (oref (oref jupyter-current-client manager) spec)))) + ;; Implementation details of binascii.b2a_base64 (what + ;; IPython uses to encode images) have changed after + ;; python 3.6 it seems. + (line-breaks (version< py-version "3.6")) (data (let ((buffer-file-coding-system 'binary)) (with-temp-buffer (set-buffer-multibyte nil)