System fixtures
π€ AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
provide.testkit.process.system_fixtures
¶
System-level process management fixtures for testing.
This module provides fixtures for managing system-level process behaviors during tests, including process title manipulation and system resource management.
Functions¶
disable_setproctitle
¶
Disables setproctitle during tests to prevent pytest-xdist performance issues.
The setproctitle module causes severe performance degradation when running tests with pytest-xdist parallelization: - Immediate slowdown on test start - Progressive performance degradation over time - High CPU usage due to frequent system calls
Mocks setproctitle as a no-op during regular test runs while preserving functionality for mutation testing tools like mutmut that use it for displaying progress information.
Autouse and session-scoped - applies automatically to all tests in a session.
Yields:
| Name | Type | Description |
|---|---|---|
None |
None
|
Context manager for test execution with setproctitle disabled |
Note
Only disables setproctitle when NOT running under mutmut. Mutmut detection uses sys.argv to check for "mutmut" in arguments.