pytest-xpara


Namepytest-xpara JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/tonyseek/pytest-xpara
SummaryAn extended parametrizing plugin of pytest.
upload_time2024-08-07 04:15:29
maintainerNone
docs_urlNone
authorJiangge Zhang
requires_pythonNone
licenseMIT
keywords pytest parametrize yaml toml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pytest-xpara
============

*pytest-xpara* is an extended parametrizing plugin of pytest.


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

::

    pip install pytest-xpara


Usage
-----

::

    py.test --xpara test_foo.py


Example
-------

.. code-block:: python

    # test_foo.py
    import pytest

    @pytest.mark.xparametrize
    def test_bar(lhs, rhs):
        assert lhs == -rhs

.. code-block:: yaml

    # test_foo.yaml
    test_bar:
      args: lhs,rhs
      data:
        - lhs: 1
          rhs: -1
        - lhs: -1
          rhs: 1
      dataids:
        - left_to_right
        - right_to_left

::

    $ py.test -v --xpara test_foo.py
    ========================== test session starts ===========================
    platform darwin -- Python 2.7.12, pytest-3.0.5, py-1.4.32, pluggy-0.4.0
    cachedir: ../.cache
    rootdir: /Users/tonyseek/Sites/pytest-xpara, inifile: setup.cfg
    plugins: xpara-0.0.0, cov-2.4.0
    collecting ... collected 2 items

    test_foo.py::test_bar[left_to_right] PASSED
    test_foo.py::test_bar[right_to_left] PASSED

    ======================== 2 passed in 0.03 seconds ========================


Contributing
------------

If you want to report bugs or request features, please feel free to open issues
or create pull requests on GitHub_.


.. _GitHub: https://github.com/tonyseek/pytest-xpara/issues
.. |Build Status| image:: https://img.shields.io/github/actions/workflow/status/tonyseek/pytest-xpara/check.yml?branch=master&style=flat
   :target: https://github.com/tonyseek/pytest-xpara/actions/workflows/check.yml
   :alt: Build Status
.. |Coverage Status| image:: https://img.shields.io/coverallsCoverage/github/tonyseek/pytest-xpara?style=flat&branch=master
   :target: https://coveralls.io/github/tonyseek/pytest-xpara
   :alt: Coverage Status
.. |PyPI Version| image:: https://img.shields.io/pypi/v/pytest-xpara?style=flat
   :target: https://pypi.org/project/pytest-xpara/
   :alt: PyPI Version

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tonyseek/pytest-xpara",
    "name": "pytest-xpara",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "pytest, parametrize, yaml, toml",
    "author": "Jiangge Zhang",
    "author_email": "tonyseek@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8a/4d/cb3221a10e42465b0935bcd35ffe1c8f4fad73764738c0132ae802035c0b/pytest_xpara-0.3.0.tar.gz",
    "platform": "any",
    "description": "pytest-xpara\n============\n\n*pytest-xpara* is an extended parametrizing plugin of pytest.\n\n\nInstallation\n------------\n\n::\n\n    pip install pytest-xpara\n\n\nUsage\n-----\n\n::\n\n    py.test --xpara test_foo.py\n\n\nExample\n-------\n\n.. code-block:: python\n\n    # test_foo.py\n    import pytest\n\n    @pytest.mark.xparametrize\n    def test_bar(lhs, rhs):\n        assert lhs == -rhs\n\n.. code-block:: yaml\n\n    # test_foo.yaml\n    test_bar:\n      args: lhs,rhs\n      data:\n        - lhs: 1\n          rhs: -1\n        - lhs: -1\n          rhs: 1\n      dataids:\n        - left_to_right\n        - right_to_left\n\n::\n\n    $ py.test -v --xpara test_foo.py\n    ========================== test session starts ===========================\n    platform darwin -- Python 2.7.12, pytest-3.0.5, py-1.4.32, pluggy-0.4.0\n    cachedir: ../.cache\n    rootdir: /Users/tonyseek/Sites/pytest-xpara, inifile: setup.cfg\n    plugins: xpara-0.0.0, cov-2.4.0\n    collecting ... collected 2 items\n\n    test_foo.py::test_bar[left_to_right] PASSED\n    test_foo.py::test_bar[right_to_left] PASSED\n\n    ======================== 2 passed in 0.03 seconds ========================\n\n\nContributing\n------------\n\nIf you want to report bugs or request features, please feel free to open issues\nor create pull requests on\u00a0GitHub_.\n\n\n.. _GitHub: https://github.com/tonyseek/pytest-xpara/issues\n.. |Build Status| image:: https://img.shields.io/github/actions/workflow/status/tonyseek/pytest-xpara/check.yml?branch=master&style=flat\n   :target: https://github.com/tonyseek/pytest-xpara/actions/workflows/check.yml\n   :alt: Build Status\n.. |Coverage Status| image:: https://img.shields.io/coverallsCoverage/github/tonyseek/pytest-xpara?style=flat&branch=master\n   :target: https://coveralls.io/github/tonyseek/pytest-xpara\n   :alt: Coverage Status\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/pytest-xpara?style=flat\n   :target: https://pypi.org/project/pytest-xpara/\n   :alt: PyPI Version\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An extended parametrizing plugin of pytest.",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/tonyseek/pytest-xpara"
    },
    "split_keywords": [
        "pytest",
        " parametrize",
        " yaml",
        " toml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "247883824d004d7fde6f7346b21e9336664b59d820b8ce2f664cf8f4168b4dbe",
                "md5": "016f507d726a3254dec40ab82764b054",
                "sha256": "3d6625020ebf69892270cf84758f8bb3799e39c023c3aba7e37a5f5b06e7d38a"
            },
            "downloads": -1,
            "filename": "pytest_xpara-0.3.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "016f507d726a3254dec40ab82764b054",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 4655,
            "upload_time": "2024-08-07T04:15:27",
            "upload_time_iso_8601": "2024-08-07T04:15:27.553187Z",
            "url": "https://files.pythonhosted.org/packages/24/78/83824d004d7fde6f7346b21e9336664b59d820b8ce2f664cf8f4168b4dbe/pytest_xpara-0.3.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a4dcb3221a10e42465b0935bcd35ffe1c8f4fad73764738c0132ae802035c0b",
                "md5": "1545b81c87e7016d4683acf9d98ecf55",
                "sha256": "e1d7fce33aefa9970c916ee97d8f66b240b78adcb543820814e8dcc8af45ea16"
            },
            "downloads": -1,
            "filename": "pytest_xpara-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1545b81c87e7016d4683acf9d98ecf55",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5693,
            "upload_time": "2024-08-07T04:15:29",
            "upload_time_iso_8601": "2024-08-07T04:15:29.307278Z",
            "url": "https://files.pythonhosted.org/packages/8a/4d/cb3221a10e42465b0935bcd35ffe1c8f4fad73764738c0132ae802035c0b/pytest_xpara-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-07 04:15:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tonyseek",
    "github_project": "pytest-xpara",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pytest-xpara"
}
        
Elapsed time: 0.54267s