vedro-unittest


Namevedro-unittest JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/vedro-universe/vedro-unittest
SummaryAllows running unittest test cases within the Vedro framework
upload_time2024-07-23 19:25:06
maintainerNone
docs_urlNone
authorNikita Tsvetkov
requires_python>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Vedro Unittest

[![Codecov](https://img.shields.io/codecov/c/github/vedro-universe/vedro-unittest/main.svg?style=flat-square)](https://codecov.io/gh/vedro-universe/vedro-unittest)
[![PyPI](https://img.shields.io/pypi/v/vedro-unittest.svg?style=flat-square)](https://pypi.python.org/pypi/vedro-unittest/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/vedro-unittest?style=flat-square)](https://pypi.python.org/pypi/vedro-unittest/)
[![Python Version](https://img.shields.io/pypi/pyversions/vedro-unittest.svg?style=flat-square)](https://pypi.python.org/pypi/vedro-unittest/)

[vedro-unittest](https://pypi.org/project/vedro-unittest/) allows running unittest test cases within the Vedro framework. This plugin seamlessly integrates unittest test cases, converting them into Vedro scenarios to leverage the powerful features of the Vedro testing framework.

## Installation

<details open>
<summary>Quick</summary>
<p>

For a quick installation, you can use a plugin manager as follows:

```shell
$ vedro plugin install vedro-unittest
```

</p>
</details>

<details>
<summary>Manual</summary>
<p>

To install manually, follow these steps:

1. Install the package using pip:

```shell
$ pip3 install vedro-unittest
```

2. Next, activate the plugin in your `vedro.cfg.py` configuration file:

```python
# ./vedro.cfg.py
import vedro
import vedro_unittest

class Config(vedro.Config):

    class Plugins(vedro.Config.Plugins):

        class VedroUnitTest(vedro_unittest.VedroUnitTest):
            enabled = True
```

</p>
</details>

## Usage

To use the plugin, create your unittest test cases as usual:

```python
# ./scenarios/test_base64.py
import unittest
from base64 import b64encode, b64decode

class TestBase64Encoding(unittest.TestCase):
    def test_encode_banana_to_base64(self):
        result = b64encode(b"banana")
        self.assertEqual(result, b"YmFuYW5h")

    def test_decode_banana_from_base64(self):
        result = b64decode(b"YmFuYW5h")
        self.assertEqual(result, b"banana")
```

Then run your tests using Vedro:

```shell
$ vedro run
```

This will automatically detect and run your unittest test cases as Vedro scenarios, allowing you to take advantage of Vedro's rich feature set.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vedro-universe/vedro-unittest",
    "name": "vedro-unittest",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Nikita Tsvetkov",
    "author_email": "tsv1@fastmail.com",
    "download_url": "https://files.pythonhosted.org/packages/59/96/c647ff5246b3180777c60d7086ac8c0ec530b522081251840b50e0fa321a/vedro_unittest-0.0.1.tar.gz",
    "platform": null,
    "description": "# Vedro Unittest\n\n[![Codecov](https://img.shields.io/codecov/c/github/vedro-universe/vedro-unittest/main.svg?style=flat-square)](https://codecov.io/gh/vedro-universe/vedro-unittest)\n[![PyPI](https://img.shields.io/pypi/v/vedro-unittest.svg?style=flat-square)](https://pypi.python.org/pypi/vedro-unittest/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/vedro-unittest?style=flat-square)](https://pypi.python.org/pypi/vedro-unittest/)\n[![Python Version](https://img.shields.io/pypi/pyversions/vedro-unittest.svg?style=flat-square)](https://pypi.python.org/pypi/vedro-unittest/)\n\n[vedro-unittest](https://pypi.org/project/vedro-unittest/) allows running unittest test cases within the Vedro framework. This plugin seamlessly integrates unittest test cases, converting them into Vedro scenarios to leverage the powerful features of the Vedro testing framework.\n\n## Installation\n\n<details open>\n<summary>Quick</summary>\n<p>\n\nFor a quick installation, you can use a plugin manager as follows:\n\n```shell\n$ vedro plugin install vedro-unittest\n```\n\n</p>\n</details>\n\n<details>\n<summary>Manual</summary>\n<p>\n\nTo install manually, follow these steps:\n\n1. Install the package using pip:\n\n```shell\n$ pip3 install vedro-unittest\n```\n\n2. Next, activate the plugin in your `vedro.cfg.py` configuration file:\n\n```python\n# ./vedro.cfg.py\nimport vedro\nimport vedro_unittest\n\nclass Config(vedro.Config):\n\n    class Plugins(vedro.Config.Plugins):\n\n        class VedroUnitTest(vedro_unittest.VedroUnitTest):\n            enabled = True\n```\n\n</p>\n</details>\n\n## Usage\n\nTo use the plugin, create your unittest test cases as usual:\n\n```python\n# ./scenarios/test_base64.py\nimport unittest\nfrom base64 import b64encode, b64decode\n\nclass TestBase64Encoding(unittest.TestCase):\n    def test_encode_banana_to_base64(self):\n        result = b64encode(b\"banana\")\n        self.assertEqual(result, b\"YmFuYW5h\")\n\n    def test_decode_banana_from_base64(self):\n        result = b64decode(b\"YmFuYW5h\")\n        self.assertEqual(result, b\"banana\")\n```\n\nThen run your tests using Vedro:\n\n```shell\n$ vedro run\n```\n\nThis will automatically detect and run your unittest test cases as Vedro scenarios, allowing you to take advantage of Vedro's rich feature set.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Allows running unittest test cases within the Vedro framework",
    "version": "0.0.1",
    "project_urls": {
        "Docs": "https://github.com/vedro-universe/vedro-unittest",
        "GitHub": "https://github.com/vedro-universe/vedro-unittest",
        "Homepage": "https://github.com/vedro-universe/vedro-unittest"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3919e02b2ce3cd22e8f7e58e055baa053c86e73c6a823edb2d35e9964119ac0",
                "md5": "c45b446efe909bf1c2758c50cd9ad449",
                "sha256": "79978210d0f615f4767affe89068f26679baa830fc57cbdf64e28159d886bded"
            },
            "downloads": -1,
            "filename": "vedro_unittest-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c45b446efe909bf1c2758c50cd9ad449",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8568,
            "upload_time": "2024-07-23T19:25:04",
            "upload_time_iso_8601": "2024-07-23T19:25:04.569747Z",
            "url": "https://files.pythonhosted.org/packages/b3/91/9e02b2ce3cd22e8f7e58e055baa053c86e73c6a823edb2d35e9964119ac0/vedro_unittest-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5996c647ff5246b3180777c60d7086ac8c0ec530b522081251840b50e0fa321a",
                "md5": "41aa755e3ac91d62d1f33645a1269232",
                "sha256": "1913d7ad865f281d523c29a474fec40fc0c9e745b97326235d94255962ccaeff"
            },
            "downloads": -1,
            "filename": "vedro_unittest-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "41aa755e3ac91d62d1f33645a1269232",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 9861,
            "upload_time": "2024-07-23T19:25:06",
            "upload_time_iso_8601": "2024-07-23T19:25:06.054079Z",
            "url": "https://files.pythonhosted.org/packages/59/96/c647ff5246b3180777c60d7086ac8c0ec530b522081251840b50e0fa321a/vedro_unittest-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-23 19:25:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vedro-universe",
    "github_project": "vedro-unittest",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "vedro-unittest"
}
        
Elapsed time: 0.26796s