何时进行Kivy应用程序的图形单元测试



我想尝试按照官方文件说的图形单元测试:

我安装了nosecoverage
但是在我输入make test
之后我有一个错误:
make: *** No rule to make target 'test'. Stop.

如何解决此问题?

make 命令应从 kivy 源文件夹的根文件夹中运行。

基本上只有:

test:
    -rm -rf kivy/tests/build
    $(NOSETESTS) kivy/tests

您也可以只使用此命令而无需浏览MakeFile

python -m nose.core your_project/your_tests

关于渲染函数(R(,我将在此处复制一些文档:

Each call to self.render (or r in our example) will generate an image named as follows:
<classname>_<funcname>-<r-call-count>.png
r-call-count represents the number of times that self.render is called inside the test function.
The reference images are named:
ref_<classname>_<funcname>-<r-call-count>.png
You can easily replace the reference image with a new one if you wish.

最新更新