Skip to content

compliance tests not running with pytest >= 7.0.0 #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tswast opened this issue Feb 14, 2022 · 3 comments
Closed

compliance tests not running with pytest >= 7.0.0 #413

tswast opened this issue Feb 14, 2022 · 3 comments
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: process A process-related concern. May include testing, release, or the like.

Comments

@tswast
Copy link
Collaborator

tswast commented Feb 14, 2022

For some reason when the latest pytest is installed, I get

(compliance-3-8) (base) ➜  python-bigquery-sqlalchemy git:(tswast-prerelease) ✗ py.test -vv --junitxml=compliance_3.8_sponge_log.xml --reruns=3 --reruns-delay=60 '--only-rerun=403 Exceeded rate limits' '--only-rerun=409 Already Exists' '--only-rerun=404 Not found' '--only-rerun=400 Cannot execute DML over a non-existent table' tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py 
/Users/swast/src/github.com/googleapis/python-bigquery-sqlalchemy/.nox/compliance-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(
====================================================================== test session starts =======================================================================
platform darwin -- Python 3.8.10, pytest-7.0.1, pluggy-1.0.0 -- /Users/swast/src/github.com/googleapis/python-bigquery-sqlalchemy/.nox/compliance-3-8/bin/python
cachedir: .pytest_cache
rootdir: /Users/swast/src/github.com/googleapis/python-bigquery-sqlalchemy, configfile: setup.cfg
plugins: rerunfailures-10.2
collected 0 items                                                                                                                                                

---------------------- generated xml file: /Users/swast/src/github.com/googleapis/python-bigquery-sqlalchemy/compliance_3.8_sponge_log.xml -----------------------
===================================================================== no tests ran in 1.52s =====================================================================

And it fails with exit code 5. https://docs.pytest.org/en/latest/reference/exit-codes.html "No tests were collected"

@tswast tswast self-assigned this Feb 14, 2022
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. label Feb 14, 2022
@tswast tswast added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Feb 14, 2022
@tswast
Copy link
Collaborator Author

tswast commented Feb 14, 2022

This is a known issue with the SQLAlchemy compliance test suite and fixed in 1.4.28 sqlalchemy/sqlalchemy#7436

Unfortunately, we are stuck on an earlier version for the time being. #385

@tswast tswast added priority: p3 Desirable enhancement or fix. May not be included in next release. type: process A process-related concern. May include testing, release, or the like. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Feb 14, 2022
@tswast
Copy link
Collaborator Author

tswast commented Feb 14, 2022

Have a temporary fix (cap the pytest version) in #401. Will leave this issue open but reclassify it as a clean-up we can do after updating SQLAlchemy version.

@chalmerlowe
Copy link
Collaborator

This was cleaned up.
The limitation based on the sqlalchemy version was eliminated (we now test against versions of sqlachemy > 1.4.28
This allowed us to remove the limits on pytest and now we are able to run pytest > 7.0.0.
Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

No branches or pull requests

2 participants