dev-python/colorlog: add patch
Signed-off-by: Andreas Billmeier <b@edevau.net>
This commit is contained in:
parent
34ff795211
commit
97b55aebb6
|
@ -1,3 +1,4 @@
|
|||
AUX colorlog-6.7.0-nocolor.patch 1066 BLAKE2B ea43721681af7de1cc95ee931d0b111a23327e8ef6684c2f08f3f6b56be54ffb2c1ffa54c2fdc297ec4183ea574e805636f432f4d76d84ee82d7eee9b95d2f21 SHA512 a001bd56036c62091c54b171f1bd0961fa51b33f7db091c1f0d409ab02b0c1d86f77011228a4f2016c277dafe8357fb5de992929276e3088fa60bc833ec9fa51
|
||||
DIST colorlog-6.6.0.tar.gz 30712 BLAKE2B 21c297d08a53bb67184bdd40f9bfae859f0bfd8ae63a27df570b316f85aa4904b8323c78a9706abbceb36ae1b76aae66150f86e8e25612caa5fe0dd4df5f25d8 SHA512 8c8bdfcfe537dc34c145fbfb9ebd0399184e3a8ab0e4bccc2e61d52a323c1372c60757cac2b023c9d39eb3c9fcf191b50c8cd4d089941aa484b30170a3cd1389
|
||||
DIST colorlog-6.7.0.tar.gz 29920 BLAKE2B b4240f3fd17b17ead968293e54d5f4e589515d333a6cdf157a6d913c7457deff67d320ee87270ce05b853616134901c8ac47c4a542ef74158e1174d92de00b3c SHA512 19b3c04beb8ac26d3db69f78bc1e7db40288c95ba7edc7c1d2495d592262dea9a1bf91e42dce0e575341eb2a572f0050866970f23d3be8c5adae518c4115787d
|
||||
EBUILD colorlog-6.6.0-r1.ebuild 426 BLAKE2B 92b3dd98b40393c012b4969b40935362392041a090c6408a632df6f3359b42c21802a3d6e0c341c8862365a96f98bd1471b05b96842d9e916184d7f058a339aa SHA512 c56f2d6764b2092334ffd6b133abe5f3b4fc9702383e5b5c9ca72c828cb295059215e8108da86fb8f6a120b1129cecaec6fb41048499e636f5ffc733638edba4
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
From 4babdb5f18bd4799c25d61f0f7937b5e164770cc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Fri, 24 Nov 2023 16:45:42 +0100
|
||||
Subject: [PATCH] Fix running tests in environment with NO_COLOR=1
|
||||
|
||||
Fix running the test suite when pytest is run with NO_COLOR=1 set
|
||||
in the environment. An fixture is autoused to ensure that the variables
|
||||
are removed for the scope of the test, while they are respected
|
||||
e.g. by pytest itself.
|
||||
---
|
||||
colorlog/tests/conftest.py | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/colorlog/tests/conftest.py b/colorlog/tests/conftest.py
|
||||
index 65fd6d4..33e23e6 100644
|
||||
--- a/colorlog/tests/conftest.py
|
||||
+++ b/colorlog/tests/conftest.py
|
||||
@@ -28,6 +28,13 @@ def assert_log_message(capsys, log_function, message, *args):
|
||||
return err
|
||||
|
||||
|
||||
+@pytest.fixture(autouse=True)
|
||||
+def clean_env(monkeypatch):
|
||||
+ monkeypatch.delenv("FORCE_COLOR", raising=False)
|
||||
+ monkeypatch.delenv("NO_COLOR", raising=False)
|
||||
+ yield
|
||||
+
|
||||
+
|
||||
@pytest.fixture()
|
||||
def reset_loggers():
|
||||
logging.root.handlers = list()
|
Loading…
Reference in New Issue