我目前有一个涉及以下.travis.yml
文件的项目:
language: python
install: "pip install tox"
script: "tox"
在本地,tox
可以正常执行并运行35个测试,但在Travis CI上,它没有运行任何测试。
更多详情请参见: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"
他们也找不到任何测试。
我的项目结构像这样:Like This:
- ...
- <module>
- tests (for the module)
- ...
项目/文件夹的结构是否不正确?
nosetest tests/
来运行测试。尝试调整你的tox.ini文件为nosetests tests/ --with-coverage --cover-package=pyiterable
。 - bnlucas