{"id":14965241,"url":"https://github.com/saltstack/pytest-helpers-namespace","last_synced_at":"2025-05-10T23:13:38.165Z","repository":{"id":45233068,"uuid":"55292278","full_name":"saltstack/pytest-helpers-namespace","owner":"saltstack","description":"PyTest Helpers Namespace","archived":false,"fork":false,"pushed_at":"2022-10-10T15:44:02.000Z","size":178,"stargazers_count":58,"open_issues_count":2,"forks_count":9,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-10T23:13:32.700Z","etag":null,"topics":["pytest","pytest-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saltstack.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2016-04-02T11:59:33.000Z","updated_at":"2024-11-05T22:18:36.000Z","dependencies_parsed_at":"2022-09-16T02:11:48.301Z","dependency_job_id":null,"html_url":"https://github.com/saltstack/pytest-helpers-namespace","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack%2Fpytest-helpers-namespace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack%2Fpytest-helpers-namespace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack%2Fpytest-helpers-namespace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack%2Fpytest-helpers-namespace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saltstack","download_url":"https://codeload.github.com/saltstack/pytest-helpers-namespace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492767,"owners_count":21916974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pytest","pytest-plugin"],"created_at":"2024-09-24T13:34:25.278Z","updated_at":"2025-05-10T23:13:38.119Z","avatar_url":"https://github.com/saltstack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://github.com/saltstack/pytest-helpers-namespace/actions/workflows/testing.yml/badge.svg\n    :target: https://github.com/saltstack/pytest-helpers-namespace/actions/workflows/testing.yml\n    :alt: See Build Status\n\n.. image:: https://codecov.io/github/saltstack/pytest-helpers-namespace/coverage.svg?branch=master\n    :target: https://codecov.io/github/saltstack/pytest-helpers-namespace?branch=master\n    :alt: Code Coverage\n\n.. image:: https://img.shields.io/pypi/v/pytest-helpers-namespace.svg?style=flat\n    :alt: PyPI Package latest release\n    :target: https://pypi.python.org/pypi/pytest-helpers-namespace\n\n.. image:: https://img.shields.io/pypi/dm/pytest-helpers-namespace.svg?style=flat\n    :alt: PyPI Package monthly downloads\n    :target: https://pypi.python.org/pypi/pytest-helpers-namespace\n\n.. image:: https://img.shields.io/pypi/wheel/pytest-helpers-namespace.svg?style=flat\n    :alt: PyPI Wheel\n    :target: https://pypi.python.org/pypi/pytest-helpers-namespace\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-helpers-namespace.svg?style=flat\n    :alt: Supported versions\n    :target: https://pypi.python.org/pypi/pytest-helpers-namespace\n\n.. image:: https://img.shields.io/pypi/implementation/pytest-helpers-namespace.svg?style=flat\n    :alt: Supported implementations\n    :target: https://pypi.python.org/pypi/pytest-helpers-namespace\n\n..\n   include-starts-here\n\n\nPytest Helpers Namespace\n========================\n\nThis plugin does not provide any helpers to `pytest`_, it does, however,\nprovide a helpers namespace in `pytest`_ which enables you to register helper\nfunctions in your ``conftest.py`` to be used within your tests without having\nto import them.\n\n\nFeatures\n--------\n\n* Provides a ``helpers`` `pytest`_ namespace which can be used to register\n  helper functions without requiring you to import them on your actual tests to\n  use them.\n\n\nRequirements\n------------\n\n* None!\n\n\nInstallation\n------------\n\nYou can install \"pytest-helpers-namespace\" via `pip`_ from `PyPI`_::\n\n    $ pip install pytest-helpers-namespace\n\n\nUsage\n-----\n\nConsider the following ``conftest.py`` file:\n\n.. code-block:: python\n\n   import pytest\n\n\n   @pytest.helpers.register\n   def foo(bar):\n       \"\"\"\n       this dumb helper function will just return what you pass to it\n       \"\"\"\n       return bar\n\n\nAnd now consider the following test case:\n\n.. code-block:: python\n\n   def test_helper_namespace():\n       assert pytest.helpers.foo(True) is True\n\n\nPretty simple right?!\n\n\nYou can even nest namespaces. Consider the following ``conftest.py`` file:\n\n.. code-block:: python\n\n   pytest_plugins = [\"helpers_namespace\"]\n\n   import pytest\n\n\n   @pytest.helpers.can.haz.register\n   def foo(bar):\n       \"\"\"\n       this dumb helper function will just return what you pass to it\n       \"\"\"\n       return bar\n\n\nAnd now consider the following test case:\n\n.. code-block:: python\n\n   def test_helper_namespace():\n       assert pytest.helpers.can.haz.foo(True) is True\n\n\nYou can even pass a name to the register function and that will be the helper function name.\n\n\n----\n\nThis `Pytest`_ plugin was generated with `Cookiecutter`_ along with\n`@hackebrot`_'s `Cookiecutter-pytest-plugin`_ template.\n\n.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter\n.. _`@hackebrot`: https://github.com/hackebrot\n.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin\n.. _`pytest`: https://github.com/pytest-dev/pytest\n.. _`pip`: https://pypi.python.org/pypi/pip/\n.. _`PyPI`: https://pypi.python.org/pypi\n\n..\n   include-ends-here\n\nDocumentation\n=============\n\nThe full documentation can be seen `here \u003chttps://pytest-helpers-namespace.readthedocs.io\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack%2Fpytest-helpers-namespace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltstack%2Fpytest-helpers-namespace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack%2Fpytest-helpers-namespace/lists"}