{"id":7929,"library":"allpairspy","title":"allpairspy: Pairwise Test Combinations Generator","description":"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.","status":"active","version":"2.5.1","language":"en","source_language":"en","source_url":"https://github.com/thombashi/allpairspy","tags":["testing","pairwise","test generation","combinatorial testing"],"install":[{"cmd":"pip install allpairspy","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"symbol":"AllPairs","correct":"from allpairspy import AllPairs"}],"quickstart":{"code":"from allpairspy import AllPairs\n\nparameters = [\n    [\"Brand X\", \"Brand Y\"],\n    [\"98\", \"NT\", \"2000\", \"XP\"],\n    [\"Internal\", \"Modem\"],\n    [\"Salaried\", \"Hourly\", \"Part-Time\", \"Contr.\"],\n    [6, 10, 15, 30, 60],\n]\n\nprint(\"PAIRWISE:\")\nfor i, pairs in enumerate(AllPairs(parameters)):\n    print(f\"{i:2d}: {pairs}\")","lang":"python","description":"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."},"warnings":[{"fix":"Upgrade Python to 3.7+ or use an older `allpairspy` version (e.g., `<2.5.1` for Python 3.6).","message":"Version 2.5.1 dropped support for Python 2.7, 3.5, and 3.6. Ensure your Python environment is 3.7 or newer.","severity":"breaking","affected_versions":">=2.5.1"},{"fix":"Upgrade Python to 3.5+ or use an older `allpairspy` version (e.g., `<2.5.0` for Python 3.4).","message":"Version 2.5.0 dropped support for Python 3.4.","severity":"breaking","affected_versions":">=2.5.0"},{"fix":"Upgrade `allpairspy` to 2.3.0 or later: `pip install --upgrade allpairspy`.","message":"Support 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.","severity":"gotcha","affected_versions":"<2.3.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Install the library using pip: `pip install allpairspy`.","cause":"The allpairspy library is not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'allpairspy'"},{"fix":"Wrap your parameter sets in a single list: `AllPairs([[\"A\", \"B\"], [1, 2]])` instead of `AllPairs([\"A\", \"B\"], [1, 2])`.","cause":"The constructor expects a single iterable (e.g., a list of lists) containing all parameter sets, not multiple separate arguments.","error":"TypeError: AllPairs() takes 1 positional argument but 2 were given"},{"fix":"Ensure the `parameters` list contains at least one non-empty list of values for each factor.","cause":"The list of parameters provided to `AllPairs` is empty or contains empty sub-lists, which prevents combination generation.","error":"ValueError: Parameters list must not be empty"}]}