Skip to content

Commit

Permalink
install sqlalchemy
Browse files Browse the repository at this point in the history
  • Loading branch information
neelasha23 committed Jan 24, 2024
1 parent 3ac5c44 commit d3dad85
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ def test_integration_sqlachemy_v1(session):

# tests
_install(session, integration=True)
session.install("sqlalchemy<2")
_check_sqlalchemy(session, version=1)
session.install(
"clickhouse-sqlalchemy",
)
Expand All @@ -183,6 +185,6 @@ def test_integration(session):
"pytest",
"src/tests/integration",
"-k",
"not (snowflake or redshift)",
"not (snowflake or redshift or clickhouse)",
"-v",
)
27 changes: 12 additions & 15 deletions src/sql/_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,21 +510,18 @@ def clickhouse(is_bypass_init=False, print_credentials=False):
yield curr
except docker.errors.NotFound:
print("Creating new container: clickhouse")
try:
with new_container(
new_container_name=db_config["docker_ct"]["name"],
image_name=db_config["docker_ct"]["image"],
ports=db_config["docker_ct"]["ports"],
environment={
"CLICKHOUSE_USER": db_config["username"],
"CLICKHOUSE_PASSWORD": db_config["password"],
"CLICKHOUSE_DB": db_config["database"],
},
ready_test=lambda: database_ready(database="clickhouse"),
) as container:
yield container
except Exception as e:
print(str(e))
with new_container(
new_container_name=db_config["docker_ct"]["name"],
image_name=db_config["docker_ct"]["image"],
ports=db_config["docker_ct"]["ports"],
environment={
"CLICKHOUSE_USER": db_config["username"],
"CLICKHOUSE_PASSWORD": db_config["password"],
"CLICKHOUSE_DB": db_config["database"],
},
ready_test=lambda: database_ready(database="clickhouse"),
) as container:
yield container


def main():
Expand Down

0 comments on commit d3dad85

Please sign in to comment.