Registry / testing / allpairspy

allpairspy

JSON →
library2.5.1pypypi✓ verified 52d ago

allpairspy is an open-source Python library for generating pairwise (all-pairs) test combinations. It helps reduce the number of test cases while ensuring comprehensive coverage by covering all possible pairs of input parameter values. The library is actively maintained with steady, though infrequent, releases.

testing
pip install allpairspy
Install & Compatibility
Where this runs
tested against v2.5.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
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AllPairs
from allpairspy import AllPairs

This example demonstrates how to generate pairwise test combinations from a list of input parameters. Each generated 'pairs' item is a combination that covers at least one occurrence of every possible pair of values from the input parameters.

from allpairspy import AllPairs parameters = [ ["Brand X", "Brand Y"], ["98", "NT", "2000", "XP"], ["Internal", "Modem"], ["Salaried", "Hourly", "Part-Time", "Contr."], [6, 10, 15, 30, 60], ] print("PAIRWISE:") for i, pairs in enumerate(AllPairs(parameters)): print(f"{i:2d}: {pairs}")
Debug
Known issues
breakingVersion 2.5.1 dropped support for Python 2.7, 3.5, and 3.6. Ensure your Python environment is 3.7 or newer.
fix
Upgrade Python to 3.7+ or use an older `allpairspy` version (e.g., `<2.5.1` for Python 3.6).
affects: >=2.5.1
breakingVersion 2.5.0 dropped support for Python 3.4.
fix
Upgrade Python to 3.5+ or use an older `allpairspy` version (e.g., `<2.5.0` for Python 3.4).
affects: >=2.5.0
gotchaSupport for `OrderedDict` as a data source was added in version 2.3.0. If you need to use `OrderedDict`, ensure you are on this version or newer.
fix
Upgrade `allpairspy` to 2.3.0 or later: `pip install --upgrade allpairspy`.
affects: <2.3.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'allpairspy'
The allpairspy library is not installed in the current Python environment.
fix
Install the library using pip: `pip install allpairspy`.
TypeError: AllPairs() takes 1 positional argument but 2 were given
The constructor expects a single iterable (e.g., a list of lists) containing all parameter sets, not multiple separate arguments.
fix
Wrap your parameter sets in a single list: `AllPairs([["A", "B"], [1, 2]])` instead of `AllPairs(["A", "B"], [1, 2])`.
ValueError: Parameters list must not be empty
The list of parameters provided to `AllPairs` is empty or contains empty sub-lists, which prevents combination generation.
fix
Ensure the `parameters` list contains at least one non-empty list of values for each factor.
Upgrade
Version history
2.5.1latest on PyPI
Audit
Dependencies

No dependency data recorded yet.

Agent activity
84 hits · last 30 days
node
12
claudebot
4
ahrefsbot
3
amazonbot
1
Resources