Allows running unittest test cases within the Vedro framework
Project description
Vedro Unittest
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
Quick
For a quick installation, you can use a plugin manager as follows:
$ vedro plugin install vedro-unittest
Manual
To install manually, follow these steps:
- Install the package using pip:
$ pip3 install vedro-unittest
- Next, activate the plugin in your
vedro.cfg.py
configuration file:
# ./vedro.cfg.py
import vedro
import vedro_unittest
class Config(vedro.Config):
class Plugins(vedro.Config.Plugins):
class VedroUnitTest(vedro_unittest.VedroUnitTest):
enabled = True
Usage
To use the plugin, create your unittest test cases as usual:
# ./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:
$ 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vedro_unittest-0.0.1.tar.gz
.
File metadata
- Download URL: vedro_unittest-0.0.1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1913d7ad865f281d523c29a474fec40fc0c9e745b97326235d94255962ccaeff |
|
MD5 | 41aa755e3ac91d62d1f33645a1269232 |
|
BLAKE2b-256 | 5996c647ff5246b3180777c60d7086ac8c0ec530b522081251840b50e0fa321a |
File details
Details for the file vedro_unittest-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: vedro_unittest-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79978210d0f615f4767affe89068f26679baa830fc57cbdf64e28159d886bded |
|
MD5 | c45b446efe909bf1c2758c50cd9ad449 |
|
BLAKE2b-256 | b3919e02b2ce3cd22e8f7e58e055baa053c86e73c6a823edb2d35e9964119ac0 |