python
config_error
ai_generated
true
错误:setuptools.errors.TestFailedError:在包 'mypackage' 中未找到测试套件 'tests'
ERROR: setuptools.errors.TestFailedError: Test suite 'tests' not found in package 'mypackage'
ID: python/setuptools-test-suite-not-found
80%修复率
85%置信度
0证据数
2025-11-18首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
根因分析
setup.cfg 中指定的测试套件目录或模块不存在。
English
The test suite directory or module specified in setup.cfg does not exist.
解决方案
-
95% 成功率 Create the test suite directory with __init__.py
Run: mkdir tests; touch tests/__init__.py; touch tests/test_example.py
-
90% 成功率 Correct the test_suite path in setup.cfg
Set test_suite = tests.test_suite (if using a module).
无效尝试
常见但无效的做法:
-
Creating an empty tests directory
80% 失败
An empty directory is not a valid test suite.
-
Removing the test_suite configuration
70% 失败
Tests will not run automatically.