| 1 |
#!/usr/bin/env python |
| 2 |
# |
| 3 |
# Copyright 2015 Thanh Ha |
| 4 |
# |
| 5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 |
# you may not use this file except in compliance with the License. |
| 7 |
# You may obtain a copy of the License at |
| 8 |
# |
| 9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 |
# |
| 11 |
# Unless required by applicable law or agreed to in writing, software |
| 12 |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 14 |
# License for the specific language governing permissions and limitations |
| 15 |
# under the License. |
| 16 |
|
| 17 |
from operator import attrgetter |
| 18 |
from pathlib import Path |
| 19 |
|
| 20 |
import pytest |
| 21 |
|
| 22 |
from tests.enum_scenarios import scenario_list |
| 23 |
from jenkins_jobs.modules import reporters |
| 24 |
|
| 25 |
|
| 26 |
fixtures_dir = Path(__file__).parent / "fixtures" |
| 27 |
|
| 28 |
|
| 29 |
@pytest.fixture( |
| 30 |
params=scenario_list(fixtures_dir), |
| 31 |
ids=attrgetter("name"), |
| 32 |
) |
| 33 |
def scenario(request): |
| 34 |
return request.param |
| 35 |
|
| 36 |
|
| 37 |
def test_yaml_snippet(check_generator): |
| 38 |
check_generator(reporters.Reporters) |