Skip to main content

Allows running unittest test cases within the Vedro framework

Project description

Vedro Unittest

Codecov PyPI PyPI - Downloads Python Version

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:

  1. Install the package using pip:
$ pip3 install vedro-unittest
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vedro_unittest-0.1.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vedro_unittest-0.1.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file vedro_unittest-0.1.0.tar.gz.

File metadata

  • Download URL: vedro_unittest-0.1.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for vedro_unittest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 88fdcfcd999848f9b5680c6b021e425e8e3caab99025dc25bd5bde3cc59f97a2
MD5 b9a3d51d861607022a3403cd3e9243b1
BLAKE2b-256 5f0a1e6bce19d2bdb70f56bf578c2e74b00414224892f90d91a84e683616c570

See more details on using hashes here.

File details

Details for the file vedro_unittest-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vedro_unittest-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for vedro_unittest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6055fd38b243f8bfd9410a693fea66ba48d7eeb1e930694db1cd6c32a646d1db
MD5 7d5b6e47e122cbb290212c088989c234
BLAKE2b-256 c6f7fdd15a6e3a2c5b7979a55692f68c6c90795bb6380b7e829690bdeb20883d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page