Skip to content

Commit

Permalink
Remove test that only verifies presence of py tags in yaml-file
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-el committed Jan 10, 2025
1 parent ed49c4f commit 0c59d5c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
19 changes: 1 addition & 18 deletions komodo/release_transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,14 @@

import argparse
import os
from typing import Dict, Sequence, Union
from typing import Dict, Union

import yaml

from komodo.matrix import format_release, get_matrix
from komodo.prettier import load_yaml, write_to_file


def get_py_coords(release_base: str, release_folder: str) -> Sequence[str]:
"""Get python versions of release files inside a given release_folder."""
filenames_with_prefix = sorted(
[
filename
for filename in os.listdir(release_folder)
if filename.startswith(release_base)
],
)
len_release_base = len(release_base + "-")
irrelevant_suffix_length = len(".yml")
return [
filename[len_release_base:-irrelevant_suffix_length]
for filename in filenames_with_prefix
]


def _pick_package_versions_for_release(
packages: dict,
rhel_ver: str,
Expand Down
8 changes: 0 additions & 8 deletions tests/test_release_transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import pytest

from komodo.release_transpiler import (
get_py_coords,
transpile_releases,
transpile_releases_for_pip,
)
Expand Down Expand Up @@ -63,13 +62,6 @@ def test_check_version_exists_for_coordinates(matrix, error_message_content, tmp
assert all(word in str(exception_info) for word in error_message_content)


def test_get_py_coords():
release_folder = os.path.join(_get_test_root(), "data", "test_releases")
release_base = "2020.01.a1"
py_coords = get_py_coords(release_base, release_folder)
assert py_coords == ["py27", "py36", "py38"]


def test_transpile_for_pip(tmpdir):
release_file = os.path.join(_get_test_root(), "data", "test_release_matrix.yml")
repo_file = os.path.join(_get_test_root(), "data", "test_repository.yml")
Expand Down

0 comments on commit 0c59d5c

Please sign in to comment.