tests: fix arguments for foreign patching test

This commit is contained in:
Fabio Valentini 2023-02-13 18:32:48 +01:00
parent 3eab0fef8e
commit ac58d59812
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF

View file

@ -77,11 +77,77 @@ def test_spec_file_render(filename: str, target: str, tmp_path: Path):
@pytest.mark.parametrize(
"filename,features,expected", [
("cxx-build-1.0.71.toml", [], "cxx-build-1.0.71.toml.patched"),
("nix-0.24.1.toml", [], "nix-0.24.1.toml.patched"),
("tokio-1.19.2.toml", [], "tokio-1.19.2.toml.patched"),
]
"filename,features,expected",
[
(
"cxx-build-1.0.71.toml",
[
"experimental-async-fn",
"parallel",
],
"cxx-build-1.0.71.toml.patched",
),
(
"nix-0.24.1.toml",
[
"acct",
"aio",
"default",
"dir",
"env",
"event",
"feature",
"fs",
"hostname",
"inotify",
"ioctl",
"kmod",
"mman",
"mount",
"mqueue",
"net",
"personality",
"poll",
"process",
"pthread",
"ptrace",
"quota",
"reboot",
"resource",
"sched",
"signal",
"socket",
"term",
"time",
"ucontext",
"uio",
"user",
"zerocopy",
],
"nix-0.24.1.toml.patched",
),
(
"tokio-1.19.2.toml",
[
"default",
"fs",
"full",
"io-std",
"io-util",
"macros",
"net",
"process",
"rt",
"rt-multi-thread",
"signal",
"stats",
"sync",
"test-util",
"time",
],
"tokio-1.19.2.toml.patched",
),
],
)
def test_drop_foreign_dependencies(filename: str, features: list[str], expected: str):
before_path = resources.files("rust2rpm.tests.samples").joinpath(filename)