Flaky BigQuery system tests
E.g., see:
https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/5869
New flakiness today:
nox > Running session system(py='2.7')
nox > /usr/local/bin/python3.6 -m virtualenv /var/code/gcp/.nox/sys-2-7 -p python2.7
nox > chdir /var/code/gcp/bigquery
nox > pip install --upgrade --pre grpcio
nox > pip install --upgrade mock pytest ../api_core ../core
nox > pip install --upgrade ../storage ../test_utils
nox > pip install --upgrade -e .[pandas]
nox > pip install --upgrade ipython==5.5
nox > py.test --quiet tests/system.py
F............................................... [100%]
=================================== FAILURES ===================================
_______________________ TestBigQuery.test_bigquery_magic _______________________
self = <tests.system.TestBigQuery testMethod=test_bigquery_magic>
@pytest.mark.skipif(pandas is None, reason='Requires `pandas`')
@pytest.mark.skipif(IPython is None, reason='Requires `ipython`')
@pytest.mark.usefixtures('ipython_interactive')
def test_bigquery_magic(self):
ip = IPython.get_ipython()
> ip.extension_manager.load_extension('google.cloud.bigquery')
E AttributeError: 'NoneType' object has no attribute 'extension_manager'
tests/system.py:1805: AttributeError
1 failed, 47 passed in 278.57 seconds
Also fails on 3.7.
Interesting that it's even trying to run that on Python 2.7. I believe we want to exclude IPython tests from Python 2.7 because they stopped supporting it in recent versions.
@alixhami Is this the issue you were encountering where two skipif statements weren't actually ANDing together?
Python 3.7 is likely failing due to Pandas missing. https://github.com/GoogleCloudPlatform/google-cloud-python/issues/5294
Possibly will be fixed by https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5387
@tswast I think the problem is that the ipython fixture is not being used for some reason. And I believe he meant 2.7 and 3.6 are failing, because 3.7 doesn't have a system test session yet.
I think the problem is that the ipython fixture is not being used for some reason.
@alixhami Ah, yeah that's probably it. I see in #5387 that you use @unittest.skipIf(pandas is None, 'Requires pandas') in the unit tests. I bet the system tests need an update to do the same (rather than use pytest.mark).
Verified locally that upgrading pytest to 3.6.0 causes this failure.
System tests have special logic for 2.7 / IPython:
# IPython does not support Python 2 after version 5.x
if session.interpreter == 'python2.7':
session.install('ipython==5.5')
else:
session.install('ipython')
BigQuery system tests are now passing again: https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/6729
I'm closing this one, although we have new flakiness: #5588, #5589