From 8cd3c41aa0ccead302235680b9e2fa9903d7548e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 25 Nov 2023 16:31:33 +0000 Subject: gentoo auto-resync : 25:11:2023 - 16:31:33 --- dev-python/pytest/Manifest | 3 +- .../pytest/files/pytest-7.4.3-no-color.patch | 37 ++++++++++++++++++++++ dev-python/pytest/pytest-7.4.3.ebuild | 5 +++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 dev-python/pytest/files/pytest-7.4.3-no-color.patch (limited to 'dev-python/pytest') diff --git a/dev-python/pytest/Manifest b/dev-python/pytest/Manifest index f47ce15ae2fd..3ee69f26e44a 100644 --- a/dev-python/pytest/Manifest +++ b/dev-python/pytest/Manifest @@ -1,5 +1,6 @@ +AUX pytest-7.4.3-no-color.patch 1293 BLAKE2B 85ae23dc612eb7825f4c3ba2d727a6115540118269ae2748fcb4b39b958180078f0c171562a84879f7b18da16149fb40d06be36e782abf41133ae6d510414490 SHA512 7550397bb42f08c886dd72674a4bfd53dbe449e30c1fe51358b77eb055d3626c053167a27cc2b0883151a4651b6133be222dcf78cab8675b980c79836f72ae57 DIST pytest-7.4.2.tar.gz 1354640 BLAKE2B 3929631bae67c5bfa86c12850c48549b6e545512b3d37d821b48f69adaa8ef057d8cfac4426c047746d9c80e7e3515cc45018744f2155805b5381e7e43cd1b12 SHA512 6f68b7e2bf6a14fbe89a452706b25c4afda69de2c0f78da9c03cf8795d1795d9bdaaff26ba5bc93931c1a04c1472a4eba58bb9774f81116419526413eb1fed4f DIST pytest-7.4.3.tar.gz 1356179 BLAKE2B 2f4fd893aaf9867f20548eababc7aac6f4978253bcc4a35c50f7e2327a48458bc184f2340764ee7fed3dd02bc779ed03f084a0d8839a18f614d32245888c4f56 SHA512 1b80e9b7e0ba8fe966d6658aa72d49d101190f255acd9eb81d66142327535b7108c921055d8fe3e330e3ff4163aa03d7c67b2807d433dd9e1799be6a59b208c9 EBUILD pytest-7.4.2.ebuild 3606 BLAKE2B 818fa4a8e80ab5440125fd6beb462477977b9ab1301401b75528b1f8f38c9f3d675ae92467c54458ef9fd678192ab240933e20c775de8e7cc36a4fd91c4484c0 SHA512 5492ea6822c304d5fc747a61e52904603d489535490c9f904474500272298c3d09505799ec183678be99f4fb80e5e9f3ecf427296c881ec9533dd4c969d03f6f -EBUILD pytest-7.4.3.ebuild 3614 BLAKE2B 804527ae3127527c101a5ef2092124acc61b267af0b808b1faa6b0b0cd966eb4c26ee97357f9f5bf43cd9692242c80920d96d50d6c1a8fc10c27ab4418ba6115 SHA512 13312d80b41c8dbe4420aa0221f7ec45e23e243d59b841fee7874b346778d38023b786cbf3be27210dab976fb6868899c379f4050c86fc4c4ed518e2fd92c546 +EBUILD pytest-7.4.3.ebuild 3713 BLAKE2B 524872d54c11f3db6127ea6cb5750a41b253bfeb05a05037b562f30bd0dcb560adfd5b82283a41a7bb01f4113ed56ded5ba25350e6c3cc568f5e13b91bb4f384 SHA512 40e7cafb57eb7b58ea9c06a46e2cb8a1e462a25f0e3648aefe8dc0757fa09c6ad376691b1d9de2f51d0d1859891b2e3f54d7c5354ba92b70065da1c128f30b99 MISC metadata.xml 391 BLAKE2B 48d31ecb4c8b171ee4e84a58399211368ddc00dfb5dbe0999f96e03d744294cd4fd5263e90600c93d1f13c7da21052faef84b6d0d56709f3559e37b3392ca31d SHA512 6e9caa57eda23995d21df6f52c52d5868e1ff56abb6c1351ffc0fe14b771639473481a2630e659caaff83f0255379aa2d012175af52a0de41221b27d3ab2f425 diff --git a/dev-python/pytest/files/pytest-7.4.3-no-color.patch b/dev-python/pytest/files/pytest-7.4.3-no-color.patch new file mode 100644 index 000000000000..a6fa02472252 --- /dev/null +++ b/dev-python/pytest/files/pytest-7.4.3-no-color.patch @@ -0,0 +1,37 @@ +From ce93a8ad7a11d1e9be76ce6af0d510f935622c1f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sat, 25 Nov 2023 12:09:32 +0100 +Subject: [PATCH] Reset color-related envvars for testing + +Reset color-related environment variables in a fixture to prevent them +from affecting test results. Otherwise, some of the tests fail +e.g. if NO_COLOR is set in the calling environment. +--- + testing/conftest.py | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/testing/conftest.py b/testing/conftest.py +index 2a3ce5203..612777304 100644 +--- a/testing/conftest.py ++++ b/testing/conftest.py +@@ -30,6 +30,17 @@ def set_column_width(monkeypatch: pytest.MonkeyPatch) -> None: + monkeypatch.setenv("COLUMNS", "80") + + ++@pytest.fixture(autouse=True) ++def reset_colors(monkeypatch: pytest.MonkeyPatch) -> None: ++ """ ++ Reset all color-related variables to prevent them from affecting internal pytest output ++ in tests that depend on it. ++ """ ++ monkeypatch.delenv("PY_COLORS", raising=False) ++ monkeypatch.delenv("NO_COLOR", raising=False) ++ monkeypatch.delenv("FORCE_COLOR", raising=False) ++ ++ + @pytest.hookimpl(hookwrapper=True, tryfirst=True) + def pytest_collection_modifyitems(items): + """Prefer faster tests. +-- +2.43.0 + diff --git a/dev-python/pytest/pytest-7.4.3.ebuild b/dev-python/pytest/pytest-7.4.3.ebuild index 34cc63f9e938..55eb8e448514 100644 --- a/dev-python/pytest/pytest-7.4.3.ebuild +++ b/dev-python/pytest/pytest-7.4.3.ebuild @@ -49,6 +49,11 @@ BDEPEND=" ) " +PATCHES=( + # https://github.com/pytest-dev/pytest/pull/11638 + "${FILESDIR}/${P}-no-color.patch" +) + src_test() { # workaround new readline defaults echo "set enable-bracketed-paste off" > "${T}"/inputrc || die -- cgit v1.2.3