libsql / sqlalchemy-libsql

SQLAchemy dialect for libSQL
MIT License
20 stars 6 forks source link

improve CI and pre-commit configurations #1

Closed barbieri closed 1 year ago

barbieri commented 1 year ago

hrana-test-server is now a submodule, to simplify execution.

Improve README.rst docs for development.

barbieri commented 1 year ago

moving this to a draft since I noticed a problem with test_suite and I don't want to integrate the CI without pytest checks.

The issue is that https://github.com/sqlalchemy/sqlalchemy/blob/main/lib/sqlalchemy/dialects/sqlite/provision.py and other places will do special checks such as filename and filename != ":memory:" and _drivernames and _sqlite_post_configure_engine that will consider whenever to create the test_schema via attachment.

sqld blocks ATTACH statements and while they are supported by hrana-test-server, the logic there will assume it's a file in some places, memory in others and it will do a mess.

You can notice this with an untracked None file left in your git repo after running the tests.

Alternatively we should force hrana-test-server to block ATTACH, mimics sqld.