Install & Compatibility
Where this runs
tested against v0.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.032s · 17.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.034s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
parametrize
✓ from parametrize import parametrize
✗ import parametrize
Direct import without submodule leads to AttributeError on parametrize decorator.
Basic usage with unittest.TestCase showing parameterized tests.
import unittest
from parametrize import parametrize
class TestMath(unittest.TestCase):
@parametrize('a,b,expected', [
(1, 1, 2),
(2, 2, 4),
(3, 5, 8)
])
def test_add(self, a, b, expected):
self.assertEqual(a + b, expected)
if __name__ == '__main__':
unittest.main()
Errors
Common errors & fixes
AttributeError: module 'parametrize' has no attribute 'parametrize'
Import using import parametrize instead of from parametrize import parametrize.
fixfrom parametrize import parametrize
TypeError: test_add() missing 2 required positional arguments: 'b' and 'expected'
Argument names in the decorator string do not match method parameters, or the tuple lengths mismatch.
fixEnsure the argument names string (e.g., 'a,b,expected') matches method parameters exactly.
ValueError: not enough values to unpack (expected x, got y)
Number of values in a test case tuple does not match the number of argument names.
fixEach test tuple must have exactly as many elements as argument names.
Upgrade
Version history
0.1.1latest on PyPI · released May 9, 2021
Audit
Dependencies
No dependency data recorded yet.