PR #1198 #1903
GitHub Actions / Test Results - 3.10
failed
Jan 10, 2025 in 0s
1 fail, 36 skipped, 61 pass in 16s
Annotations
Check warning on line 0 in duckdb_engine.tests.test_datatypes
github-actions / Test Results - 3.10
test_div_is_floordiv (duckdb_engine.tests.test_datatypes) failed
results.xml [took 0s]
Raw output
AttributeError: __enter__
engine = Engine(duckdb:///:memory:)
#x1B[0m#x1B[94mdef#x1B[39;49;00m #x1B[92mtest_div_is_floordiv#x1B[39;49;00m(engine: Engine) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
test_table = Table(#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33mtest_table#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, MetaData(), Column(#x1B[33m"#x1B[39;49;00m#x1B[33mvalue#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, FLOAT), Column(#x1B[33m"#x1B[39;49;00m#x1B[33meur2usd_rate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, FLOAT)#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
stmt = test_table.c.value / test_table.c.eur2usd_rate#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> #x1B[94massert#x1B[39;49;00m #x1B[96mstr#x1B[39;49;00m(stmt.compile(engine)) == #x1B[33m"#x1B[39;49;00m#x1B[33mtest_table.value / test_table.eur2usd_rate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mduckdb_engine/tests/test_datatypes.py#x1B[0m:250:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31m.nox/tests-3-10-sqlalchemy-2-0-35-duckdb-1-0-0/lib/python3.10/site-packages/sqlalchemy/sql/elements.py#x1B[0m:308: in compile
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._compiler(dialect, **kw)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m.nox/tests-3-10-sqlalchemy-2-0-35-duckdb-1-0-0/lib/python3.10/site-packages/sqlalchemy/sql/elements.py#x1B[0m:316: in _compiler
#x1B[0m#x1B[94mreturn#x1B[39;49;00m dialect.statement_compiler(dialect, #x1B[96mself#x1B[39;49;00m, **kw)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m.nox/tests-3-10-sqlalchemy-2-0-35-duckdb-1-0-0/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py#x1B[0m:1429: in __init__
#x1B[0mCompiled.#x1B[92m__init__#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, dialect, statement, **kwargs)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m.nox/tests-3-10-sqlalchemy-2-0-35-duckdb-1-0-0/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py#x1B[0m:870: in __init__
#x1B[0m#x1B[96mself#x1B[39;49;00m.string = #x1B[96mself#x1B[39;49;00m.process(#x1B[96mself#x1B[39;49;00m.statement, **compile_kwargs)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m.nox/tests-3-10-sqlalchemy-2-0-35-duckdb-1-0-0/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py#x1B[0m:915: in process
#x1B[0m#x1B[94mreturn#x1B[39;49;00m obj._compiler_dispatch(#x1B[96mself#x1B[39;49;00m, **kwargs)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m.nox/tests-3-10-sqlalchemy-2-0-35-duckdb-1-0-0/lib/python3.10/site-packages/sqlalchemy/sql/visitors.py#x1B[0m:141: in _compiler_dispatch
#x1B[0m#x1B[94mreturn#x1B[39;49;00m meth(#x1B[96mself#x1B[39;49;00m, **kw) #x1B[90m# type: ignore # noqa: E501#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m.nox/tests-3-10-sqlalchemy-2-0-35-duckdb-1-0-0/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py#x1B[0m:3400: in visit_binary
#x1B[0m#x1B[94mreturn#x1B[39;49;00m disp(binary, operator_, **kw)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m.nox/tests-3-10-sqlalchemy-2-0-35-duckdb-1-0-0/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py#x1B[0m:3108: in visit_truediv_binary
#x1B[0m#x1B[94mif#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.dialect.div_is_floordiv:#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <duckdb_engine.Dialect object at 0x7f82c1b8ba30>
#x1B[0m#x1B[37m@property#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mdef#x1B[39;49;00m #x1B[92mdiv_is_floordiv#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m) -> #x1B[96mbool#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
> #x1B[94mwith#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.connect() #x1B[94mas#x1B[39;49;00m c:#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE AttributeError: __enter__#x1B[0m
#x1B[1m#x1B[31mduckdb_engine/__init__.py#x1B[0m:315: AttributeError
Loading