2013-11-26 10 views
0

我试图按照GAE的Python SDK Setting up a testing framework部分实现单元测试。来自unittest2的GAE“Ran 0测试”

使用其样本测试运行和测试,我收到以下输出:

冉0试验在0.000s

OK

我已经unittest2安装,我也尝试运行以下命令,但都产生了相同的响应:

python -m unittest discover ~/foldername 
python -m unittest2 discover ~/foldername 

我试着从Python文档中添加Basic example测试文件,但也得到了相同的结果。

在单元测试的文件夹中尝试了所有以上并且没有__init__.py

接下来我应该尝试调试此问题?

更新

我的目录结构如下:

├── app.yaml 
├── myclass.py 
├── bulkloader.yaml 
├── myappname.py 
├── index.yaml 
├── testmodel.py 
├── test_runner.py 
└── unit_tests 
   ├── demotestcase.py 
   └── sample.py 

从以上引用链接两个测试的内容。

+0

你的目录结构是什么样的?这些文件的内容是什么样的? – RemcoGerlich

+0

更新目录结构,链接文件 –

回答

0
Usage: python -m unittest discover [options] 

-s directory  Directory to start discovery ('.' default) 
-p pattern  Pattern to match test files ('test*.py' default)