如何运行 CPython3.3 自己的回归测试?
python3.3 -m test.regrtest packaging.tests.test_command_install_data
引发ImportError:没有名为“test.packaging”的模块
最佳答案
python3 -m test.regrtest
该命令有选项,“python3 -m regrtest --help”显示了广泛的帮助。您可以做的一件事是将特定测试模块的名称添加到命令行,这些名称应该是“test”包中的模块。例如,“python3 -m test.regrtest test_socket”运行模块“test.test_socket”中的测试。
您使用的命令行存在两个问题:
您尝试运行不在测试包中但在其他顶级包中的测试
顶级包“打包”不是 Python 3.3(或任何其他 Python 版本)
关于python-3.x - 如何有选择地运行 cpython 的回归测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10645357/