{"id":27306,"library":"pytest-split-tests","title":"pytest-split-tests","description":"A Pytest plugin for running a subset of your tests by splitting them into equally sized groups. Useful for parallel test execution across CI runners. Version 1.1.0 is the latest, forked from pytest-test-groups.","status":"active","version":"1.1.0","language":"python","source_language":"en","source_url":"https://github.com/wchill/pytest-split-tests","tags":["pytest","plugin","test-splitting","parallel-testing","ci"],"install":[{"cmd":"pip install pytest-split-tests","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Plugin requires pytest to run","package":"pytest","optional":false}],"imports":[{"note":"The plugin is auto-discovered; no explicit import needed. Importing is only for accessing internal helpers, not standard usage.","wrong":"from pytest_split_tests import something","symbol":"pytest_split_tests","correct":"import pytest_split_tests"}],"quickstart":{"code":"pytest --group=1 --groups=4 --grouped-by=file --dist=loadscope","lang":"bash","description":"Run tests in group 1 of 4 groups, grouped by file, with loadscope distribution."},"warnings":[{"fix":"Upgrade to Python 3.6+.","message":"pytest-split-tests does not support Python 2; requires Python 3.6+.","severity":"breaking","affected_versions":"all"},{"fix":"Use pytest-split-tests instead of pytest-test-groups.","message":"The original project pytest-test-groups is unmaintained; pytest-split-tests is the active fork.","severity":"deprecated","affected_versions":"< 1.0.0"},{"fix":"Add '--grouped-by=file' to pytest command.","message":"By default, --grouped-by is set to 'name' which may not distribute tests evenly across groups. Use --grouped-by=file for better distribution.","severity":"gotcha","affected_versions":"all"},{"fix":"Always specify --groups when using --group.","message":"The plugin requires the --groups argument to be set; if omitted, all tests run (no splitting). This can cause silent unexpected behavior.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure pytest is installed in the same environment: pip install pytest pytest-split-tests","cause":"The package is installed but the plugin is not discovered because pytest is run without the correct version or the plugin is not installed in the same environment.","error":"ModuleNotFoundError: No module named 'pytest_split_tests'"},{"fix":"Use --group=<N> --groups=<TOTAL> together.","cause":"The --group argument is used without providing --groups.","error":"Error: --group requires --groups to be specified."},{"fix":"Upgrade pytest: pip install --upgrade pytest","cause":"Incompatible pytest version (likely too old).","error":"AttributeError: module 'pytest' has no attribute 'register_assert_rewrite'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}