File tree Expand file tree Collapse file tree
tests/core/engine_adapter/integration Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import typing as t
77import time
88from contextlib import contextmanager
9-
9+ import uuid
1010import pandas as pd # noqa: TID253
1111import pytest
1212from sqlglot import exp , parse_one
@@ -205,7 +205,7 @@ def __init__(
205205 self .mark = mark
206206 self .gateway = gateway
207207 self ._columns_to_types = columns_to_types
208- self .test_id = random_id ( short = True )
208+ self .test_id = f" { self . mark } _ { uuid . uuid4 (). hex [: 8 ] } "
209209 self ._context : t .Optional [Context ] = None
210210 self .is_remote = is_remote
211211 self ._schemas : t .List [
@@ -684,7 +684,7 @@ def create_context(
684684 private_sqlmesh_dir / "config.yml" ,
685685 private_sqlmesh_dir / "config.yaml" ,
686686 ],
687- variables = {"tmp_path" : str (path or self .tmp_path )},
687+ variables = {"tmp_path" : (path or self .tmp_path ). as_posix ( )},
688688 )
689689 if config_mutator :
690690 config_mutator (self .gateway , config )
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def config(tmp_path: pathlib.Path) -> Config:
3535 pathlib .Path (os .path .join (os .path .dirname (__file__ ), "config.yaml" )),
3636 ],
3737 personal_paths = [(SQLMESH_PATH / "config.yaml" ).expanduser ()],
38- variables = {"tmp_path" : str ( tmp_path )},
38+ variables = {"tmp_path" : tmp_path . as_posix ( )},
3939 )
4040
4141
@@ -78,7 +78,9 @@ def _create(engine_name: str, gateway: str) -> EngineAdapter:
7878 if engine_name == "duckdb" :
7979 assert isinstance (connection_config , DuckDBConnectionConfig )
8080 for raw_path in [
81- v for v in (connection_config .catalogs or {}).values () if isinstance (v , str )
81+ v
82+ for v in (connection_config .catalogs or {}).values ()
83+ if isinstance (v , str ) and v != ":memory:"
8284 ]:
8385 pathlib .Path (raw_path ).unlink (missing_ok = True )
8486
You can’t perform that action at this time.
0 commit comments