{"library":"pytest-helpers-namespace","title":"Pytest Helpers Namespace","description":"pytest-helpers-namespace is a pytest plugin that provides a convenient namespace to register helper functions in your `conftest.py` file. This allows you to use these helper functions directly within your tests without needing explicit imports, simplifying test code and promoting reusability. The current version is 2021.12.29, and releases are generally infrequent, indicating a mature and stable but not actively developed project.","language":"python","status":"maintenance","last_verified":"Mon May 18","install":{"commands":["pip install pytest-helpers-namespace"],"cli":null},"imports":["import pytest\n\n@pytest.helpers.register\ndef my_helper_function():\n    ..."],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pytest\n\n# conftest.py\n# This line ensures the plugin is loaded if not automatically discovered\npytest_plugins = ['helpers_namespace']\n\n@pytest.helpers.register\ndef foo(bar):\n    \"\"\" This dumb helper function will just return what you pass to it \"\"\"\n    return bar\n\n@pytest.helpers.can.haz.register\ndef nested_helper(value):\n    return f'Nested: {value}'\n\n# test_example.py\ndef test_helper_namespace():\n    assert pytest.helpers.foo(True) is True\n    assert pytest.helpers.can.haz.nested_helper('test') == 'Nested: test'","lang":"python","description":"Define helper functions in your `conftest.py` using the `@pytest.helpers.register` decorator. These helpers, including nested ones, become available via `pytest.helpers` in your test functions without explicit imports. The `pytest_plugins = ['helpers_namespace']` declaration in `conftest.py` ensures the plugin is loaded.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-18","installed_version":"2021.12.29","pypi_latest":"2021.12.29","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.6,"avg_import_s":0.43,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pytest-helpers-namespace","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.42,"mem_mb":12.2,"disk_size":"30.7M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pytest-helpers-namespace","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.6,"import_time_s":0.28,"mem_mb":12.2,"disk_size":"31M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pytest-helpers-namespace","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.56,"mem_mb":12.9,"disk_size":"33.6M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pytest-helpers-namespace","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.6,"import_time_s":0.48,"mem_mb":12.9,"disk_size":"34M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pytest-helpers-namespace","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.51,"mem_mb":12.8,"disk_size":"25.2M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pytest-helpers-namespace","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.4,"import_time_s":0.49,"mem_mb":12.8,"disk_size":"26M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pytest-helpers-namespace","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.45,"mem_mb":11.8,"disk_size":"25.0M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pytest-helpers-namespace","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.5,"import_time_s":0.41,"mem_mb":11.8,"disk_size":"25M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pytest-helpers-namespace","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.35,"mem_mb":11.2,"disk_size":"30.0M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pytest-helpers-namespace","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.1,"import_time_s":0.31,"mem_mb":11.2,"disk_size":"31M"}]}}