Skip to content

Commit 07640e9

Browse files
authored
Refactor tests (#3271)
1 parent 9b42f89 commit 07640e9

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

examples/yamllint/line-length.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
- name: Task example
3+
debug:
4+
msg: "This is a very long text that is used in order to verify the rule that checks for very long lines. We do hope it was long enough to go over the line limit."

src/ansiblelint/rules/yaml_rule.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ def _fetch_skips(data: Any, collector: dict[int, set[str]]) -> dict[int, set[str
120120
id="invalid",
121121
),
122122
pytest.param("examples/yamllint/valid.yml", "yaml", [], id="valid"),
123+
pytest.param(
124+
"examples/yamllint/line-length.yml",
125+
"yaml",
126+
["Line too long (166 > 160 characters)"],
127+
id="line-length",
128+
),
123129
pytest.param(
124130
"examples/yamllint/multi-document.yaml", "yaml", [], id="multi-document"
125131
),

test/rules/test_line_too_long.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)