{"library":"pytest-find-dependencies","title":"pytest-find-dependencies","description":"A pytest plugin designed to automatically identify dependencies between tests. It achieves this by running tests in various sequences (forward and backward) and employing a binary search algorithm to pinpoint which tests rely on others. This can help uncover hidden state-based dependencies that lead to flaky tests. The current version is 0.6.0 and it is actively maintained.","language":"python","status":"active","last_verified":"Fri May 15","install":{"commands":["pip install pytest-find-dependencies"],"cli":{"name":"pytest","version":"pytest 9.0.3"}},"imports":["This plugin is primarily activated via the pytest command-line interface using the `--find-dependencies` option. Direct Python imports into user test files for its core functionality are not typical."],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pytest\n\n# Simulate a shared state that might be modified by one test and read by another\n_shared_state = {'value': 0}\n\ndef test_setup_value():\n    \"\"\"This test sets a value in the shared state.\"\"\"\n    _shared_state['value'] = 10\n    assert True\n\ndef test_use_value():\n    \"\"\"This test depends on the value being set by test_setup_value.\"\"\"\n    assert _shared_state['value'] == 10\n\ndef test_independent():\n    \"\"\"An independent test with no dependencies.\"\"\"\n    assert 1 + 1 == 2\n\n# To run this example, save it as `test_dependencies.py` and execute:\n# pytest --find-dependencies test_dependencies.py\n# The output should indicate a dependency found between 'test_use_value' and 'test_setup_value'.","lang":"python","description":"To use `pytest-find-dependencies`, install it and then run `pytest` with the `--find-dependencies` option. The plugin will automatically analyze your tests and report any identified dependencies. The example demonstrates a logical dependency via a shared mutable state, which the plugin should detect.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-15","installed_version":"0.6.0","pypi_latest":"0.6.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.7,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pytest-find-dependencies","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"30.7M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pytest-find-dependencies","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.7,"import_time_s":null,"mem_mb":null,"disk_size":"31M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pytest-find-dependencies","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"33.6M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pytest-find-dependencies","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.7,"import_time_s":null,"mem_mb":null,"disk_size":"34M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pytest-find-dependencies","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"25.2M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pytest-find-dependencies","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.4,"import_time_s":null,"mem_mb":null,"disk_size":"26M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pytest-find-dependencies","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"25.0M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pytest-find-dependencies","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.5,"import_time_s":null,"mem_mb":null,"disk_size":"26M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pytest-find-dependencies","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"30.0M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pytest-find-dependencies","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":3.1,"import_time_s":null,"mem_mb":null,"disk_size":"31M"}]}}