说我有2个函数rahul@RNA-HP:~$ node test.js
[ "['Requirement already satisfied: pytube in ./.local/lib/python3.7/site-packages (9.5.0)', '']" ]
和func GetCar()
。出于显而易见的原因,func PrintFormat()
不是接口的一部分。
两个功能都通过功能接收器绑定到PrintFormat
。
如果我对car struct{}
有依赖性,如何测试GetCar
。
在可以使用的测试过程中,可以模拟func PrintFormat()
以输出一些任意值吗?
func PrintFormat()