Skip to main content

This package allows to create parametrized unit-tests that work with the standard unittest package. A parametrized test case is automatically converted to multiple test cases. Since they are TestCase subclasses, they work with other test suites that recognize TestCases.

Examples:

import unittest
import paramunittest

@paramunittest.parametrized(
    ('1', '2'),
    #(4, 3),
    ('2', '3'),
    (('4', ), {'b': '5'}),
    ((), {'a': 5, 'b': 6}),
    {'a': 5, 'b': 6},
)
class TestFoo(paramunittest.ParametrizedTestCase):
    def setParameters(self, a, b):
        self.a = a
        self.b = b

    def testLess(self):
        self.assertLess(self.a, self.b)

@paramunittest.parametrized(
    ('1', '2'),
    #(4, 3),
    ('2', '3'),
    (('4', ), {'b': '5'}),
    ((), {'a': 5, 'b': 6}),
    {'a': 5, 'b': 6},
)
class TestBar(unittest.TestCase):
    def setParameters(self, a, b):
        self.a = a
        self.b = b

    def testLess(self):
        self.assertLess(self.a, self.b)

Metadata

Release files for ParamUnittest 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for ParamUnittest 0.2
File Size Uploaded Provenance Actions
ParamUnittest-0.2.zip 4.6 kB Without provenance Details for ParamUnittest-0.2.zip
ParamUnittest-0.2.tar.gz 2.5 kB Without provenance Details for ParamUnittest-0.2.tar.gz

Release files / ParamUnittest-0.2.zip

Download URL ParamUnittest-0.2.zip
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3986ff045ca77d43de48d931c04a067e2e084727a0fdf7f418fde217823d74cb
BLAKE2b-256 checksum
How to use checksums
60b7b775b4ce23ca303c7a41ab9a3ed303ba85d10d89b41524daa07619073fc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / ParamUnittest-0.2.tar.gz

Download URL ParamUnittest-0.2.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a14509549171465c3a444fa631cb7066787e05970777e6370fbb17cde148e74e
BLAKE2b-256 checksum
How to use checksums
a8637b69e8db183bb3592295f6d086cbc46be9bdbe6fdfa0d9f924a682faa5ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for ParamUnittest 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page