Skip to content

Commit

Permalink
Merge pull request #1129 from Mause/Mause-patch-4
Browse files Browse the repository at this point in the history
build: update motherduck test
  • Loading branch information
Mause authored Oct 21, 2024
2 parents 0ef6e5e + 220c18f commit 5a031c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions duckdb_engine/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ class UInteger(Integer):
pass


class VarInt(Integer):
pass


def compile_uint(element: Integer, compiler: PGTypeCompiler, **kw: Any) -> str:
return getattr(element, "name", type(element).__name__)

Expand Down Expand Up @@ -199,6 +203,7 @@ def __init__(self, fields: Dict[str, TV]):
"enum": sqltypes.Enum,
"bool": sqltypes.BOOLEAN,
"varchar": String,
"varint": VarInt,
}


Expand Down
2 changes: 1 addition & 1 deletion duckdb_engine/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_plain_register(conn: Connection) -> None:
"dev" in duckdb_version, reason="md extension not available for dev builds"
)
@mark.skipif(
duckdb_version != "0.9.2", reason="md extension not available for this version"
duckdb_version != "1.1.1", reason="md extension not available for this version"
)
def test_motherduck() -> None:
engine = create_engine(
Expand Down
5 changes: 3 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def group(title: str) -> Generator[None, None, None]:
# TODO: 3.11, 3.12, 3.13
@nox.session(py=["3.8", "3.9", "3.10"])
@nox.parametrize("duckdb", ["0.9.2", "1.0.0"])
@nox.parametrize("sqlalchemy", ["1.3", "1.4", "2.0"])
@nox.parametrize("sqlalchemy", ["1.3", "1.4", "2.0.35"])
def tests(session: nox.Session, duckdb: str, sqlalchemy: str) -> None:
tests_core(session, duckdb, sqlalchemy)

Expand All @@ -38,7 +38,8 @@ def nightly(session: nox.Session) -> None:
def tests_core(session: nox.Session, duckdb: str, sqlalchemy: str) -> None:
with group(f"{session.name} - Install"):
poetry(session)
session.install(f"sqlalchemy~={sqlalchemy}")
operator = "==" if sqlalchemy.count(".") == 2 else f"~="
session.install(f"sqlalchemy{operator}{sqlalchemy}")
if duckdb == "master":
session.install("duckdb", "--pre", "-U")
else:
Expand Down

0 comments on commit 5a031c8

Please sign in to comment.