Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed Jul 18, 2023
1 parent 1308e0a commit 170016d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
WSLENV: FORCE_COLOR:PYTEST_REQPASS:TOXENV:GITHUB_STEP_SUMMARY
# Number of expected test passes, safety measure for accidental skip of
# tests. Update value if you add/remove tests.
PYTEST_REQPASS: 808
PYTEST_REQPASS: 809
steps:
- name: Activate WSL1
if: "contains(matrix.shell, 'wsl')"
Expand Down
13 changes: 13 additions & 0 deletions test/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,16 @@ def test_runner_tmp_file(
result = runner.run()
assert len(result) == 1
assert result[0].tag == "syntax-check[empty-playbook]"


def test_with_full_path(default_rules_collection: RulesCollection) -> None:
"""Ensure that lintables include file path starting from home directory."""
filename = Path("examples/playbooks/deep").absolute()
runner = Runner(
filename,
rules=default_rules_collection,
verbosity=0,
)
result = runner.run()
assert len(result) == 1
assert result[0].tag == "name[casing]"

0 comments on commit 170016d

Please sign in to comment.