Skip to content
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

SQLAlchemy has added support for computed col reflection; need to adapt Alembic tests #669

Closed
zzzeek opened this issue Mar 17, 2020 · 2 comments

Comments

@zzzeek
Copy link
Member

zzzeek commented Mar 17, 2020

e.g.

Traceback (most recent call last):
File "/home/jenkins/workspace/alembic_master/00816f09/tests/test_autogen_computed.py", line 65, in test_remove_computed_column
is_(c.computed, None)
File "/home/jenkins/workspace/alembic_master/00816f09/.tox/py38-sqla13-sqlite-postgresql-mysql-oracle/lib/python3.8/site-packages/sqlalchemy/testing/assertions.py", line 264, in is_
assert a is b, msg or "%r is not %r" % (a, b)
AssertionError: Computed(<sqlalchemy.sql.elements.TextClause object at 0x7fb51dc02280>, persisted=False) is not None
assert Computed(<sqlalchemy.sql.elements.TextClause object at 0x7fb51dc02280>, persisted=False) is None

@zzzeek
Copy link
Member Author

zzzeek commented Mar 17, 2020

basically the tests and maybe the compare module need to be sensitive to the version of SQLAlchemy in use and adjust accordingly

@sqla-tester
Copy link
Collaborator

Mike Bayer has proposed a fix for this issue in the master branch:

Support computed reflection. https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/1797

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants