Metadata-Version: 2.1
Name: ld-feature-patch
Version: 1.0.0
Summary: Patch Launch Darkly feature flags for unit testing
Home-page: https://github.com/pymetrics/ld-feature-patch
Author: Chris Lawlor
Author-email: chris@pymetrics.com
License: Apache Software License 2.0
Keywords: Launch Darkly,testing,pytest,unit test
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Framework :: Pytest
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.5
License-File: LICENSE
License-File: AUTHORS.rst

================
LD Feature Patch
================


.. image:: https://img.shields.io/pypi/v/ld_patch.svg
        :target: https://pypi.python.org/pypi/ld_patch

.. image:: https://img.shields.io/travis/pymetrics/ld-feature-patch.svg
        :target: https://travis-ci.com/pymetrics/ld-feature-patch

.. image:: https://readthedocs.org/projects/ld-feature-patch/badge/?version=latest
        :target: https://ld-feature-patch.readthedocs.io/en/latest/
        :alt: Documentation Status



Patch `Launch Darkly`_ feature flags for unit testing


* Free software: Apache Software License 2.0
* Documentation: https://ld-feature-patch.readthedocs.io/en/latest/.


Usage
--------

.. code:: python

    from ld_patch import patch_feature

    @patch_feature("my.flag.key", True)
    def test_my_code():

        # Feature defaults to False
        show_feature = ldclient.variation(
            "my.flag.key",
            "test@example.com",
            False
        )

        # But patch_feature set it to True
        assert show_feature == True


Installation
------------

.. code:: bash

    python -m pip install ld-feature-patch

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _`Launch Darkly`: https://launchdarkly.com/


=======
History
=======

1.0.0 (2024-01-12)
------------------

* Drop support for Python 3.6. Add Python 3.10 - 3.12.

0.1.0 (2021-01-11)
------------------

* First release on PyPI.
