Metadata-Version: 1.1
Name: pytest-redis
Version: 1.2.1
Summary: Redis fixtures and fixture factories for Pytest.
Home-page: https://github.com/ClearcodeHQ/pytest-redis
Author: Clearcode - The A Room
Author-email: thearoom@clearcode.cc
License: LGPLv3
Description: pytest-redis
        ============
        
        .. image:: https://img.shields.io/pypi/v/pytest-redis.svg
            :target: https://pypi.python.org/pypi/pytest-redis/
            :alt: Latest PyPI version
        
        .. image:: https://img.shields.io/pypi/wheel/pytest-redis.svg
            :target: https://pypi.python.org/pypi/pytest-redis/
            :alt: Wheel Status
        
        .. image:: https://img.shields.io/pypi/pyversions/pytest-redis.svg
            :target: https://pypi.python.org/pypi/pytest-redis/
            :alt: Supported Python Versions
        
        .. image:: https://img.shields.io/pypi/l/pytest-redis.svg
            :target: https://pypi.python.org/pypi/pytest-redis/
            :alt: License
        
        Package status
        --------------
        
        .. image:: https://travis-ci.org/ClearcodeHQ/pytest-redis.svg?branch=v1.2.1
            :target: https://travis-ci.org/ClearcodeHQ/pytest-redis
            :alt: Tests
        
        .. image:: https://coveralls.io/repos/ClearcodeHQ/pytest-redis/badge.png?branch=v1.2.1
            :target: https://coveralls.io/r/ClearcodeHQ/pytest-redis?branch=v1.2.1
            :alt: Coverage Status
        
        .. image:: https://requires.io/github/ClearcodeHQ/pytest-redis/requirements.svg?tag=v1.2.1
             :target: https://requires.io/github/ClearcodeHQ/pytest-redis/requirements/?tag=v1.2.1
             :alt: Requirements Status
        
        What is this?
        =============
        
        This is a pytest plugin, that enables you to test your code that relies on a running Redis database.
        It allows you to specify additional fixtures for Redis process and client.
        
        How to use
        ==========
        
        Plugin contains two fixtures
        
        * **redisdb** - it's a client fixture that has functional scope. After each test, it cleans Redis database for more reliable tests.
        * **redis_proc** - session scoped fixture, that starts Redis instance at it's first use and stops at the end of the tests.
        
        Simply include one of these fixtures into your tests fixture list.
        
        You can also create additional redis client and process fixtures if you'd need to:
        
        
        .. code-block:: python
        
            from pytest_redis import factories
        
            redis_my_proc = factories.redis_proc(port=None, logsdir='/tmp')
            redis_my = factories.redis('redis_my_proc')
        
        .. note::
        
            Each RabbitMQ process fixture can be configured in a different way than the others through the fixture factory arguments.
        
        Configuration
        =============
        
        You can define your settings in three ways, it's fixture factory argument, command line option and pytest.ini configuration option.
        You can pick which you prefer, but remember that these settings are handled in the following order:
        
            * ``Fixture factory argument``
            * ``Command line option``
            * ``Configuration option in your pytest.ini file``
        
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | Redis option              | Fixture factory argument | Command line option | pytest.ini option | Default               |
        +===========================+==========================+=====================+===================+=======================+
        | executable                | executable               | --redis-exec        | redis_exec        | /usr/bin/redis-server |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | host                      | host                     | --redis-host        | redis_host        | 127.0.0.1             |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | port                      | port                     | --redis-port        | redis_port        | random                |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | connection timeout        | timeout                  | --redis-timeout     | redis_timeout     | 30                    |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | number of databases       | db_count                 | --redis-db-count    | redis_db_count    | 8                     |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | Whether to enable logging | syslog                   | --redis-syslog      | redis_syslog      | False                 |
        | to the system logger      |                          |                     |                   |                       |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | Log directory location    | logsdir                  | --redis-logsdir     | redis_logsdir     | $TMPDIR               |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | Redis log verbosity level | loglevel                 | --redis-loglevel    | redis_loglevel    | notice                |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | Compress dump files       | compress                 | --redis-compress    | redis_compress    | True                  |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | Add checksum to RDB files | checksum                 | --redis-rdbcompress | redis_rdbchecksum | False                 |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        | Save configuration        | save                     | --redis-save        | redis_save        | ""                    |
        +---------------------------+--------------------------+---------------------+-------------------+-----------------------+
        
        Example usage:
        
        * pass it as an argument in your own fixture
        
            .. code-block:: python
        
                redis_proc = factories.redis_proc(port=8888)
        
        * use ``--redis-port`` command line option when you run your tests
        
            .. code-block::
        
                py.test tests --redis-port=8888
        
        
        * specify your port as ``redis_port`` in your ``pytest.ini`` file.
        
            To do so, put a line like the following under the ``[pytest]`` section of your ``pytest.ini``:
        
            .. code-block:: ini
        
                [pytest]
                redis_port = 8888
        
        Package resources
        -----------------
        
        * Bug tracker: https://github.com/ClearcodeHQ/pytest-redis/issues
        
        
        
        CHANGELOG
        =========
        
        1.2.1
        -------
        -------
        
        - [feature] ability to configure syslog-enabled for redis in command line, pytest.ini or factory argument.
        - [feature] ability to configure rdbchecksum for redis in command line, pytest.ini or factory argument.
        - [feature] ability to configure rdbcompression for redis in command line, pytest.ini or factory argument.
        - [ehnacement] - RedisExecutor handling parameters and their translation to redis values if needed.
        - [feature] ability to configure save option for redis in command line, pytest.ini or factory argument.
        
        1.1.1
        -------
        - [cleanup] removed path.py dependency
        
        1.1.0
        -------
        
        - [feature] - migrate usage of getfuncargvalue to getfixturevalue. require at least pytest 3.0.0
        
        1.0.0
        -------
        
        - [enhancements] removed the possibility to pass the custom config. No need to include one in package now.
        - [enhancements] command line, pytest.ini and fixture factory options for setting custom number of databases in redis
        - [enhancements] command line, pytest.ini and fixture factory options for redis log verbosity
        - [enhancements] command line, pytest.ini and fixture factory options for modifying connection timeout
        - [enhancements] command line and pytest.ini options for modifying executable
        - [enhancements] command line and pytest.ini options for modifying host
        - [enhancements] command line and pytest.ini options for modifying port
        - [enhancements] command line and pytest.ini options for modifying logs directory destination
        
Keywords: tests py.test pytest fixture redis
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries :: Python Modules
