Skip to content

Commit 431922b

Browse files
committed
Add a test for unmake-variant
1 parent 52cc181 commit 431922b

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nothing interesting here

tests/artifacts/test-plugin-package/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ name = "test-plugin-package"
77
version = "0"
88
description = "Installable plugin for testing"
99
requires-python = ">=3.9"
10+
readme = "README"
Binary file not shown.
Binary file not shown.

tests/commands/test_unmake_variant.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
from __future__ import annotations
2+
3+
from typing import TYPE_CHECKING
4+
5+
import pytest
6+
7+
from tests.utils import assert_zips_equal
8+
from variantlib.commands.main import main
9+
10+
if TYPE_CHECKING:
11+
from pathlib import Path
12+
13+
14+
@pytest.mark.parametrize(
15+
"filename",
16+
[
17+
"test_plugin_package-0-py3-none-any-00000000.whl",
18+
],
19+
)
20+
def test_unmake_variant(
21+
filename: str,
22+
test_plugin_package_wheel_path: Path,
23+
tmp_path: Path,
24+
) -> None:
25+
main(
26+
[
27+
"unmake-variant",
28+
"-f",
29+
f"tests/artifacts/{filename}",
30+
"-o",
31+
str(tmp_path),
32+
]
33+
)
34+
assert_zips_equal(
35+
test_plugin_package_wheel_path,
36+
tmp_path / "test_plugin_package-0-py3-none-any.whl",
37+
)

0 commit comments

Comments
 (0)