是否可以在 go 中为某些包拆分测试过程? go test package - 使用包中所有 *_test.go 文件中的所有函数 Test*。如果您有很多测试并尝试进行 TDT,那么总是收到所有测试日志会很无聊。
最佳答案
参见“去帮助测试”和“去帮助测试标志”。引用后面的话:
...
-run regexp
Run only those tests and examples matching the regular
expression.
...
关于testing - 仅从包中测试一些功能/套件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18162240/