Skip to content

Commit

Permalink
Add blackbox test for cli.run_linter
Browse files Browse the repository at this point in the history
  • Loading branch information
erik committed Jan 6, 2019
1 parent 3f41799 commit 251e523
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pytest

import squabble.cli
from squabble import config, lint, reporter, rule

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

reporter.report(reporter_name, issues, files)


def test_cli_linter():
"""Dumb test to make sure things are wired correctly in CLI."""
base_cfg = config.get_base_config()
exit_status = squabble.cli.run_linter(base_cfg, SQL_FILES)
assert exit_status == 1

0 comments on commit 251e523

Please sign in to comment.