commit:     3421377cd7fad6be0e10f838a365010b9a02cc3c
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 11 20:51:16 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Sun Aug 11 22:11:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3421377c

app-misc/tmuxp: fix broken test dependency on typing-extensions

It is needed for all versions of python, not simply arbitrarily 3.10.
Although it actually should not be needed -- the issue is that pytest
automatically tries to import all files in tests/ and scan them for
testcases. Even a file that exists solely to be used by mypy and has no
tests, still gets imported for collection purposes.

Instead, just make the fixtures be ignored by the collector. Now
typing-extensions isn't needed at all.

Closes: https://bugs.gentoo.org/934083
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 app-misc/tmuxp/tmuxp-1.27.0.ebuild | 7 ++++++-
 app-misc/tmuxp/tmuxp-1.43.0.ebuild | 6 +++++-
 app-misc/tmuxp/tmuxp-1.45.0.ebuild | 6 +++++-
 app-misc/tmuxp/tmuxp-1.46.0.ebuild | 6 +++++-
 4 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/app-misc/tmuxp/tmuxp-1.27.0.ebuild 
b/app-misc/tmuxp/tmuxp-1.27.0.ebuild
index e1e8c9e1a030..6770368cc34d 100644
--- a/app-misc/tmuxp/tmuxp-1.27.0.ebuild
+++ b/app-misc/tmuxp/tmuxp-1.27.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2023 Gentoo Authors
+# Copyright 2019-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -35,6 +35,11 @@ EPYTEST_DESELECT=(
        "tests/cli/test_load.py::test_load_zsh_autotitle_warning"
 )
 
+EPYTEST_IGNORE=(
+       # not actually tests, but throws off test collection
+       "tests/fixtures/"
+)
+
 distutils_enable_tests pytest
 
 python_test() {

diff --git a/app-misc/tmuxp/tmuxp-1.43.0.ebuild 
b/app-misc/tmuxp/tmuxp-1.43.0.ebuild
index 098741bc50f2..c02b6d3937a2 100644
--- a/app-misc/tmuxp/tmuxp-1.43.0.ebuild
+++ b/app-misc/tmuxp/tmuxp-1.43.0.ebuild
@@ -24,7 +24,6 @@ RDEPEND="
 BDEPEND="
        test? (
                dev-python/pytest-mock[${PYTHON_USEDEP}]
-               $(python_gen_cond_dep 
'>=dev-python/typing-extensions-4.0.1[${PYTHON_USEDEP}]' 3.{9..10})
                >=dev-python/pytest-rerunfailures-4.2[${PYTHON_USEDEP}]
                >=dev-python/tomli-1.1.0[${PYTHON_USEDEP}]
                !dev-python/flaky
@@ -36,6 +35,11 @@ EPYTEST_DESELECT=(
        "tests/cli/test_load.py::test_load_zsh_autotitle_warning"
 )
 
+EPYTEST_IGNORE=(
+       # not actually tests, but throws off test collection
+       "tests/fixtures/"
+)
+
 distutils_enable_tests pytest
 
 python_prepare_all() {

diff --git a/app-misc/tmuxp/tmuxp-1.45.0.ebuild 
b/app-misc/tmuxp/tmuxp-1.45.0.ebuild
index b77d79f89706..2a33db870fa5 100644
--- a/app-misc/tmuxp/tmuxp-1.45.0.ebuild
+++ b/app-misc/tmuxp/tmuxp-1.45.0.ebuild
@@ -25,7 +25,6 @@ BDEPEND="
        test? (
                >=dev-python/pytest-6.2.5[${PYTHON_USEDEP}]
                >=dev-python/pytest-mock-3.14.0[${PYTHON_USEDEP}]
-               $(python_gen_cond_dep 
'>=dev-python/typing-extensions-4.0.1[${PYTHON_USEDEP}]' 3.{9..10})
                >=dev-python/pytest-rerunfailures-4.2[${PYTHON_USEDEP}]
                >=dev-python/tomli-1.1.0[${PYTHON_USEDEP}]
                !dev-python/flaky
@@ -37,6 +36,11 @@ EPYTEST_DESELECT=(
        "tests/cli/test_load.py::test_load_zsh_autotitle_warning"
 )
 
+EPYTEST_IGNORE=(
+       # not actually tests, but throws off test collection
+       "tests/fixtures/"
+)
+
 distutils_enable_tests pytest
 
 python_prepare_all() {

diff --git a/app-misc/tmuxp/tmuxp-1.46.0.ebuild 
b/app-misc/tmuxp/tmuxp-1.46.0.ebuild
index b77d79f89706..2a33db870fa5 100644
--- a/app-misc/tmuxp/tmuxp-1.46.0.ebuild
+++ b/app-misc/tmuxp/tmuxp-1.46.0.ebuild
@@ -25,7 +25,6 @@ BDEPEND="
        test? (
                >=dev-python/pytest-6.2.5[${PYTHON_USEDEP}]
                >=dev-python/pytest-mock-3.14.0[${PYTHON_USEDEP}]
-               $(python_gen_cond_dep 
'>=dev-python/typing-extensions-4.0.1[${PYTHON_USEDEP}]' 3.{9..10})
                >=dev-python/pytest-rerunfailures-4.2[${PYTHON_USEDEP}]
                >=dev-python/tomli-1.1.0[${PYTHON_USEDEP}]
                !dev-python/flaky
@@ -37,6 +36,11 @@ EPYTEST_DESELECT=(
        "tests/cli/test_load.py::test_load_zsh_autotitle_warning"
 )
 
+EPYTEST_IGNORE=(
+       # not actually tests, but throws off test collection
+       "tests/fixtures/"
+)
+
 distutils_enable_tests pytest
 
 python_prepare_all() {

Reply via email to