Skip to content

Commit 3a3bf88

Browse files
committed
fix: Use last model in test selector
1 parent ccb0c2d commit 3a3bf88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,14 @@ def model_files(dbt_project_dir):
345345
def selector_file(model_files, dbt_project_dir):
346346
"""Create a selector file."""
347347
p = dbt_project_dir / "selectors.yml"
348-
first_model = next(str(m.stem) for m in model_files)
348+
last_model = [str(m.stem) for m in model_files][-1]
349349

350350
p.write_text(f"""\
351351
selectors:
352352
- name: first_model
353353
definition:
354354
method: fqn
355-
value: "{first_model}"
355+
value: "{last_model}"
356356
""")
357357

358358
return p

0 commit comments

Comments
 (0)