【发布时间】:2015-09-06 01:41:51
【问题描述】:
我目前有一个带有以下.travis.yml 文件的项目:
language: python
install: "pip install tox"
script: "tox"
在本地,tox 正确执行并运行 35 个测试,但在 Travis CI 上,它运行 0 个测试。
更多详情:https://travis-ci.org/neverendingqs/pyiterable/builds/78954867
我也尝试了其他方法,包括:
language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5.0b3"
- "3.5-dev"
- "nightly"
# also fails with just `nosetest` and no `install` step
install: "pip install coverage unittest2"
script: "nosetests --with-coverage --cover-package=pyiterable"
他们也找不到any tests。
我的项目结构是Like This:
- ...
- <module>
- tests (for the module)
- ...
项目/文件夹的结构是否不正确?
【问题讨论】:
-
您是否尝试过在 nosetest 命令中指定测试位置?我只在我的一个项目中使用 Travis CI,并使用
nosetest tests/运行测试。尝试将您的 tox.ini 调整为nosetests tests/ --with-coverage --cover-package=pyiterable -
刚试了-没有成功=[
-
@bnlucas 我可以看看你的回购结构吗?
-
是的,很抱歉。应该加了。 github.com/bnlucas/python-basehash