public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fedrq] epel10: Fix pytest invocation
@ 2026-07-14  1:11 Maxwell G
  0 siblings, 0 replies; only message in thread
From: Maxwell G @ 2026-07-14  1:11 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/fedrq
            Branch : epel10
            Commit : 35e9895cacaf4deb954725093b021f097f3b30e1
            Author : Maxwell G <maxwell@gtmx.me>
            Date   : 2024-11-01T18:07:15-05:00
            Stats  : +7/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/fedrq/c/35e9895cacaf4deb954725093b021f097f3b30e1?branch=epel10

            Log:
            Fix pytest invocation

Setting pythonpath in the pytest config is not supported by EL 9's
pytest version, so let's call python3 -m pytest which already includes
the current directory.

---
diff --git a/fedrq.spec b/fedrq.spec
index d772a5b..f36669f 100644
--- a/fedrq.spec
+++ b/fedrq.spec
@@ -81,7 +81,11 @@ install -Dpm 0644 fedrq.fish %{buildroot}%{fish_completions_dir}/fedrq.fish
 %check
 bash -x ./tests/test_data/build.sh
 
-FEDRQ_BACKEND=dnf %pytest -v -m "not no_rpm_mock"
+# Use python3 -m to ensure the current directory is part of sys.path so the
+# tests can import from its own package.
+
+FEDRQ_BACKEND=dnf %{py3_test_envvars} \
+    %{python3} -m pytest -v -m "not no_rpm_mock"
 
 %if %{with libdnf5}
 # Some tests are failing only in mock and only with Python 3.12
@@ -93,7 +97,8 @@ FEDRQ_BACKEND=dnf %pytest -v -m "not no_rpm_mock"
     and not test_baseurl_repog
 }
 %endif
-FEDRQ_BACKEND=libdnf5 %pytest -v -m "not no_rpm_mock" %{?skips:-k '%{skips}'}
+FEDRQ_BACKEND=libdnf5 %{py3_test_envvars} \
+    %{python3} -m pytest -v -m "not no_rpm_mock" %{?skips:-k '%{skips}'}
 %endif
 
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-14  1:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-14  1:11 [rpms/fedrq] epel10: Fix pytest invocation Maxwell G

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox