Skip to content

Commit

Permalink
More linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Feb 14, 2021
1 parent 922ed99 commit 18f3fa9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/TestExamples.py
@@ -1,18 +1,20 @@
"""Assure samples produced desire outcomes."""
import os

import pytest

from ansiblelint.runner import Runner


@pytest.fixture(scope="function")
@pytest.fixture
def _change_into_examples_dir(request):
os.chdir('examples')
yield
os.chdir('..')


def test_example(default_rules_collection, _change_into_examples_dir):
@pytest.mark.usefixtures('_change_into_examples_dir')
def test_example(default_rules_collection):
"""example.yml is expected to have 15 match errors inside."""
result = Runner('playbooks/example.yml', rules=default_rules_collection).run()
assert len(result) == 15
Expand Down

0 comments on commit 18f3fa9

Please sign in to comment.