Skip to content
Permalink
Browse files
fix: dialect atribute wasn't provided (#291)
  • Loading branch information
jimfulton committed Aug 23, 2021
1 parent b1fdeae commit 2cf05a0f37e32344b29ba2e92d709f7e51b20916
Showing with 10 additions and 1 deletion.
  1. +1 −1 sqlalchemy_bigquery/__init__.py
  2. +2 −0 sqlalchemy_bigquery/base.py
  3. +7 −0 tests/unit/test_sqlalchemy_bigquery.py
@@ -22,7 +22,7 @@

from .version import __version__ # noqa

from .base import BigQueryDialect
from .base import BigQueryDialect, dialect # noqa
from .base import (
STRING,
BOOL,
@@ -986,6 +986,8 @@ def get_view_definition(self, connection, view_name, schema=None, **kw):
return view.view_query


dialect = BigQueryDialect

try:
import alembic # noqa
except ImportError:
@@ -171,3 +171,10 @@ def test_multi_value_insert(faux_conn, last_query):
" (%(id_m0:INT64)s), (%(id_m1:INT64)s), (%(id_m2:INT64)s)",
{"id_m0": 0, "id_m1": 1, "id_m2": 2},
)


def test_follow_dialect_attribute_convention():
import sqlalchemy_bigquery.base

assert sqlalchemy_bigquery.dialect is sqlalchemy_bigquery.BigQueryDialect
assert sqlalchemy_bigquery.base.dialect is sqlalchemy_bigquery.BigQueryDialect

0 comments on commit 2cf05a0

Please sign in to comment.