Skip to content

Commit

Permalink
Tests when packages are excluded
Browse files Browse the repository at this point in the history
See #22
  • Loading branch information
suvayu committed May 16, 2024
1 parent 7514c71 commit 19899d4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,25 @@ def test_update_pkg_deps(CONF, repo, expect):
assert changes == []


@pytest.mark.parametrize("exclude", ["cyclic", "base"])
@pytest.mark.parametrize(
"repo, expect", [("scm", []), ("scm-dep", ["not-empty"])], indirect=["repo"]
)
def test_update_pkg_deps_excluded(CONF, repo, expect, exclude):
cyclic_pkgs = {example_pkgs["scm"], example_pkgs["scm-dep"]}
match exclude:
case "cyclic":
CONF["repos"].pop(*(cyclic_pkgs - {remote_name(repo)}))
case "base":
CONF["repos"].pop(example_pkgs["scm-base"])
update_pkg_deps(CONF, repo, next_versions)
changes = repo.index.diff(None)
if expect:
assert changes
else:
assert changes == []


@pytest.mark.parametrize("repo", ["scm"], indirect=True)
def test_alt_pkg_names(CONF, repo):
pkg_dash2us(f"{repo.working_dir}/pyproject.toml") # setup
Expand Down

0 comments on commit 19899d4

Please sign in to comment.