Skip to content

Commit 18ce1a9

Browse files
committed
Fix tests
1 parent 0380174 commit 18ce1a9

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

sqlmesh/core/config/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
ALL_CONFIG_FILENAMES = ("config.py", "config.yml", "config.yaml", "sqlmesh.yml", "sqlmesh.yaml")
1313

1414
# For personal paths (~/.sqlmesh/) where python config is not supported
15-
YAML_CONFIG_FILENAMES = (n for n in ALL_CONFIG_FILENAMES if not n.endswith(".py"))
15+
YAML_CONFIG_FILENAMES = tuple(n for n in ALL_CONFIG_FILENAMES if not n.endswith(".py"))
1616

1717
# Note: is here to prevent having to import from sqlmesh.dbt.loader which introduces a dependency
1818
# on dbt-core in a native project

tests/cli/test_cli.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,21 +1954,13 @@ def test_init_dbt_template(runner: CliRunner, tmp_path: Path):
19541954
)
19551955
assert result.exit_code == 0
19561956

1957-
config_path = tmp_path / "config.py"
1957+
config_path = tmp_path / "sqlmesh.yaml"
19581958
assert config_path.exists()
19591959

1960-
with open(config_path) as file:
1961-
config = file.read()
1962-
1963-
assert (
1964-
config
1965-
== """from pathlib import Path
1960+
config = config_path.read_text()
19661961

1967-
from sqlmesh.dbt.loader import sqlmesh_config
1968-
1969-
config = sqlmesh_config(Path(__file__).parent)
1970-
"""
1971-
)
1962+
assert "model_defaults" in config
1963+
assert "start:" in config
19721964

19731965

19741966
@time_machine.travel(FREEZE_TIME)

0 commit comments

Comments
 (0)