python config_error ai_generated true

ERROR: setuptools.errors.TestFailedError: Test suite 'tests' not found in package 'mypackage'

ID: python/setuptools-test-suite-not-found

Also available as: JSON · Markdown · 中文
80%Fix Rate
85%Confidence
0Evidence
2025-11-18First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.9 active
3.10 active

Root Cause

The test suite directory or module specified in setup.cfg does not exist.

generic

中文

setup.cfg 中指定的测试套件目录或模块不存在。

Workarounds

  1. 95% success Create the test suite directory with __init__.py
    Run: mkdir tests; touch tests/__init__.py; touch tests/test_example.py
  2. 90% success Correct the test_suite path in setup.cfg
    Set test_suite = tests.test_suite (if using a module).

Dead Ends

Common approaches that don't work:

  1. Creating an empty tests directory 80% fail

    An empty directory is not a valid test suite.

  2. Removing the test_suite configuration 70% fail

    Tests will not run automatically.