{"library":"lib-detect-testenv","type":"library","category":null,"description":"The `lib-detect-testenv` library provides utility functions to programmatically detect whether Python code is currently running within a test environment. It supports detection of `pytest`, `doctest` (including PyCharm's docrunner), and `setup.py test` execution contexts. The library also offers a Command Line Interface (CLI) for integration into shell scripts and CI/CD pipelines. The current version is 3.0.1, last released on December 15, 2025, indicating active maintenance.","language":"python","status":"active","version":"3.0.1","tags":["doctest","pytest","test-detection","test-environment","testing","unittest"],"last_verified":"Fri May 22","install":[{"cmd":"pip install lib-detect-testenv","imports":["from lib_detect_testenv import is_testenv_active","from lib_detect_testenv import is_pytest_active","from lib_detect_testenv import is_doctest_active","from lib_detect_testenv import is_setup_test_active"]},{"cmd":"pip install --upgrade lib-detect-testenv[test]","imports":[]}],"homepage":null,"github":"https://github.com/bitranox/lib_detect_testenv","docs":null,"changelog":null,"pypi":"https://pypi.org/project/lib-detect-testenv/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.8,"avg_import_s":0.02,"wheel_type":"wheel"},"url":"https://checklist.day/v1/registry/lib-detect-testenv/compatibility"}}