Skip to content

Commit 470a2a5

Browse files
committed
Add pytest integration tests in tmt
Signed-off-by: Cristian Le <[email protected]>
1 parent 9ac99e3 commit 470a2a5

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.distro/plans/pytest.fmf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
summary: Upstream pytest
2+
discover+:
3+
filter: "tag: pytest"
4+
execute:
5+
how: tmt

tests/main.fmf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
tag: [ pytest ]
2+
require:
3+
- pipx
4+
- cmake
5+
path: /
6+
test: |
7+
set -x
8+
9+
pipx run uv pip compile --no-deps \
10+
-o requirements.txt \
11+
--extra test \
12+
./pyproject.toml
13+
14+
# Install requirements from Fedora
15+
dnf install -y $(sed -nr "s/(.*)==.*/python3dist\(\1\)/p" requirements.txt)
16+
17+
/all:
18+
summary: All pytest
19+
test+: |
20+
python3 -m pytest

0 commit comments

Comments
 (0)