Skip to content

tests/system/test_alembic.py::test_alembic_scenario is failing for system-3.8 #382

Closed
@aucampia

Description

@aucampia

GOOGLE_CLOUD_PROJECT=... nox -s system-3.8 fails on tests/system/test_alembic.py::test_alembic_scenario.

Environment details

  • OS type and version: GNU/Linux fedora 34
  • Python version: Python 3.9.9
  • pip version: pip 21.0.1 from /usr/lib/python3.9/site-packages/pip (python 3.9)
  • sqlalchemy-bigquery version: main branch

Steps to reproduce

  1. Run:
GOOGLE_CLOUD_PROJECT=... nox -s system-3.8 

Code example

See https://github.com/googleapis/python-bigquery-sqlalchemy/blob/6e2fa4925b5407c9d7d66f5840d51e9bf44f5008/tests/system/test_alembic.py

Stack trace

$ GOOGLE_CLOUD_PROJECT=... nox -s system-3.8 
nox > Running session system-3.8
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/system-3-8
nox > python -m pip install --pre grpcio
nox > python -m pip install mock pytest google-cloud-testutils -c /home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/testing/constraints-3.8.txt
nox > python -m pip install -e .[tests,alembic] -c /home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/testing/constraints-3.8.txt
nox > py.test --quiet --junitxml=system_3.8_sponge_log.xml tests/system
============================================================================ test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy, configfile: setup.cfg
collected 50 items / 1 skipped / 49 selected                                                                                                                                

tests/system/test__struct.py ..s                                                                                                                                      [  6%]
tests/system/test_alembic.py F                                                                                                                                        [  8%]
tests/system/test_helpers.py ssss                                                                                                                                     [ 16%]
tests/system/test_sqlalchemy_bigquery.py ........................................ss                                                                                   [100%]

================================================================================= FAILURES ==================================================================================
___________________________________________________________________________ test_alembic_scenario ___________________________________________________________________________
Traceback (most recent call last):
  File "/home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/tests/system/test_alembic.py", line 80, in test_alembic_scenario
    assert alembic_table("account", "schema") == [
AssertionError: assert ["SchemaField... 'NULLABLE')"] == ["SchemaField...one, (), ())"]
  At index 0 diff: "SchemaField('id', 'INTEGER', 'REQUIRED')" != "SchemaField('id', 'INTEGER', 'REQUIRED', None, (), ())"
  Use -v to get the full diff
--------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
/home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/.nox/system-3-8/lib/python3.8/site-packages/google/auth/_default.py:73: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/
  warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
/home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/.nox/system-3-8/lib/python3.8/site-packages/google/auth/_default.py:73: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/
  warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
/home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/.nox/system-3-8/lib/python3.8/site-packages/google/cloud/bigquery/client.py:535: UserWarning: Cannot create BigQuery Storage client, the dependency google-cloud-bigquery-storage is not installed.
  warnings.warn(
------------------------------ generated xml file: /home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/system_3.8_sponge_log.xml -------------------------------
========================================================================== short test summary info ==========================================================================
FAILED tests/system/test_alembic.py::test_alembic_scenario - assert ["SchemaField... 'NULLABLE')"] == ["SchemaField...one, (), ())"]
============================================================ 1 failed, 42 passed, 8 skipped in 251.99s (0:04:11) ============================================================
nox > Command py.test --quiet --junitxml=system_3.8_sponge_log.xml tests/system failed with exit code 1
nox > Session system-3.8 failed.

Running with -vv

Traceback (most recent call last):
  File "/home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/tests/system/test_alembic.py", line 80, in test_alembic_scenario
    assert alembic_table("account", "schema") == [
AssertionError: assert ["SchemaField('id', 'INTEGER', 'REQUIRED')",\n "SchemaField('name', 'STRING(50)', 'REQUIRED', 'The name')",\n "SchemaField('description', 'STRING(200)', 'NULLABLE')"] == ["SchemaField('id', 'INTEGER', 'REQUIRED', None, (), ())",\n "SchemaField('name', 'STRING(50)', 'REQUIRED', 'The name', (), ())",\n "SchemaField('description', 'STRING(200)', 'NULLABLE', None, (), ())"]
  At index 0 diff: "SchemaField('id', 'INTEGER', 'REQUIRED')" != "SchemaField('id', 'INTEGER', 'REQUIRED', None, (), ())"
  Full diff:
    [
  -  "SchemaField('id', 'INTEGER', 'REQUIRED', None, (), ())",
  ?                                          --------------
  +  "SchemaField('id', 'INTEGER', 'REQUIRED')",
  -  "SchemaField('name', 'STRING(50)', 'REQUIRED', 'The name', (), ())",
  ?                                                           --------
  +  "SchemaField('name', 'STRING(50)', 'REQUIRED', 'The name')",
  -  "SchemaField('description', 'STRING(200)', 'NULLABLE', None, (), ())",
  ?                                                       --------------
  +  "SchemaField('description', 'STRING(200)', 'NULLABLE')",
    ]

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery-sqlalchemy API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions