Skip to content

Commit 251e523

Browse files
committed
Add blackbox test for cli.run_linter
1 parent 3f41799 commit 251e523

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_snapshots.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import pytest
77

8+
import squabble.cli
89
from squabble import config, lint, reporter, rule
910

1011
SQL_FILES = glob.glob('tests/sql/*.sql')
@@ -75,3 +76,10 @@ def test_reporter_sanity(reporter_name):
7576
issues.extend(lint.check_file(cfg, file_name, contents))
7677

7778
reporter.report(reporter_name, issues, files)
79+
80+
81+
def test_cli_linter():
82+
"""Dumb test to make sure things are wired correctly in CLI."""
83+
base_cfg = config.get_base_config()
84+
exit_status = squabble.cli.run_linter(base_cfg, SQL_FILES)
85+
assert exit_status == 1

0 commit comments

Comments
 (0)