Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
Tests: move is_yaml_file() to utils
Browse files Browse the repository at this point in the history
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
  • Loading branch information
Hunor Csomortáni authored and MartinBasti committed Jan 7, 2020
1 parent d1ac0fe commit 1b28f5c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@
import pytest
import yaml
import requests
from tests.integration.utils import test_env, make_bundle


def is_yaml_file(path):
"""
Tell if 'path' ends in .yaml or .yml
"""
return path.endswith(".yaml") or path.endswith(".yml")
from tests.integration.utils import test_env, make_bundle, is_yaml_file


def has(suffix, manifest_path):
Expand Down
9 changes: 1 addition & 8 deletions tests/integration/replace_registry/replace_registry_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@
import pytest
from distutils import dir_util
from itertools import cycle
from tests.integration.utils import test_env, make_bundle


def is_yaml_file(path):
"""
Tell if 'path' ends in .yaml or .yml
"""
return path.endswith(".yaml") or path.endswith(".yml")
from tests.integration.utils import test_env, make_bundle, is_yaml_file


@pytest.mark.skipif(
Expand Down
7 changes: 7 additions & 0 deletions tests/integration/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,3 +499,10 @@ def concatenated_files(directory):
with open(file, 'r') as fp:
ret += fp.read()
return ret


def is_yaml_file(path):
"""
Tell if 'path' ends in .yaml or .yml
"""
return path.endswith(".yaml") or path.endswith(".yml")

0 comments on commit 1b28f5c

Please sign in to comment.