summaryrefslogtreecommitdiff
path: root/psutil
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2022-12-30 22:21:09 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2022-12-30 22:21:09 +0100
commitc6b71453653609827f74aa074989ae4b9da69ece (patch)
treec060cb97f31cff5d90cdf52d878e8bd299b643d4 /psutil
parentb73d7ee952db293c6bee4397e13b2039a3d78d9d (diff)
downloadpsutil-c6b71453653609827f74aa074989ae4b9da69ece.tar.gz
fix make test-coverage target
Diffstat (limited to 'psutil')
-rw-r--r--psutil/tests/__init__.py3
-rwxr-xr-xpsutil/tests/test_testutils.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py
index ec9c7480..f66ff813 100644
--- a/psutil/tests/__init__.py
+++ b/psutil/tests/__init__.py
@@ -87,7 +87,7 @@ __all__ = [
"HAS_IONICE", "HAS_MEMORY_MAPS", "HAS_PROC_CPU_NUM", "HAS_RLIMIT",
"HAS_SENSORS_BATTERY", "HAS_BATTERY", "HAS_SENSORS_FANS",
"HAS_SENSORS_TEMPERATURES", "HAS_MEMORY_FULL_INFO", "MACOS_11PLUS",
- "MACOS_12PLUS",
+ "MACOS_12PLUS", "COVERAGE",
# subprocesses
'pyrun', 'terminate', 'reap_children', 'spawn_testproc', 'spawn_zombie',
'spawn_children_pair',
@@ -128,6 +128,7 @@ PYPY = '__pypy__' in sys.builtin_module_names
APPVEYOR = 'APPVEYOR' in os.environ
GITHUB_ACTIONS = 'GITHUB_ACTIONS' in os.environ or 'CIBUILDWHEEL' in os.environ
CI_TESTING = APPVEYOR or GITHUB_ACTIONS
+COVERAGE = 'COVERAGE_RUN' in os.environ
# are we a 64 bit process?
IS_64BIT = sys.maxsize > 2 ** 32
diff --git a/psutil/tests/test_testutils.py b/psutil/tests/test_testutils.py
index dd98538c..0298ea4e 100755
--- a/psutil/tests/test_testutils.py
+++ b/psutil/tests/test_testutils.py
@@ -27,6 +27,7 @@ from psutil._common import open_binary
from psutil._common import open_text
from psutil._common import supports_ipv6
from psutil.tests import CI_TESTING
+from psutil.tests import COVERAGE
from psutil.tests import HAS_CONNECTIONS_UNIX
from psutil.tests import PYTHON_EXE
from psutil.tests import PsutilTestCase
@@ -368,6 +369,7 @@ class TestMemLeakClass(TestMemoryLeak):
@retry_on_failure()
@unittest.skipIf(CI_TESTING, "skipped on CI")
+ @unittest.skipIf(COVERAGE, "skipped during test coverage")
def test_leak_mem(self):
ls = []