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
80%Fix Rate
85%Confidence
0Evidence
2025-11-18First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 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
-
95% success Create the test suite directory with __init__.py
Run: mkdir tests; touch tests/__init__.py; touch tests/test_example.py
-
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:
-
Creating an empty tests directory
80% fail
An empty directory is not a valid test suite.
-
Removing the test_suite configuration
70% fail
Tests will not run automatically.