From 93cc237511b8ae2cef72edc2bde85acd084d2c74 Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Wed, 4 Apr 2018 09:00:21 -0700 Subject: [PATCH] Specifies IPython version 5.5 when running Python 2.7 tests --- bigquery/nox.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bigquery/nox.py b/bigquery/nox.py index 5f4741e61490..07c5ea80408f 100644 --- a/bigquery/nox.py +++ b/bigquery/nox.py @@ -35,12 +35,20 @@ def default(session): run the tests. """ # Install all test dependencies, then install this package in-place. - session.install('mock', 'pytest', 'pytest-cov', 'ipython', *LOCAL_DEPS) + session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS) + + # Pandas does not support Python 3.4 if session.interpreter == 'python3.4': session.install('-e', '.') else: session.install('-e', '.[pandas]') + # IPython does not support Python 2 after version 5.x + if session.interpreter == 'python2.7': + session.install('ipython==5.5') + else: + session.install('ipython') + # Run py.test against the unit tests. session.run( 'py.test', @@ -87,13 +95,19 @@ def system(session, py): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. - session.install('mock', 'pytest', 'ipython', *LOCAL_DEPS) + session.install('mock', 'pytest', *LOCAL_DEPS) session.install( os.path.join('..', 'storage'), os.path.join('..', 'test_utils'), ) session.install('-e', '.[pandas]') + # IPython does not support Python 2 after version 5.x + if session.interpreter == 'python2.7': + session.install('ipython==5.5') + else: + session.install('ipython') + # Run py.test against the system tests. session.run( 'py.test',