我目前有一个项目包含以下内容.travis.yml
file:
language: python
install: "pip install tox"
script: "tox"
在当地,tox
正确执行并运行了 35 个测试,但在 Travis CI 上,它运行0 tests.
更多细节:https://travis-ci.org/neverendingqs/pyiterable/builds/78954867 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"
他们也找不到任何测试 https://travis-ci.org/neverendingqs/pyiterable/builds/78954591.
我的项目结构是像这样 https://github.com/neverendingqs/pyiterable:
- ...
- <module>
- tests (for the module)
- ...
项目/文件夹结构是否不正确?
文件夹结构没有任何问题。
看起来 Travis CI 上的文件被认为是可执行的(日志来自https://travis-ci.org/neverendingqs/pyiterable/builds/79049179 https://travis-ci.org/neverendingqs/pyiterable/builds/79049179):
nosetests --verbosity=3
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
nose.selector: INFO: /home/travis/build/neverendingqs/pyiterable/LICENSE.txt is executable; skipped
nose.selector: INFO: /home/travis/build/neverendingqs/pyiterable/pyiterable/iterable.py is executable; skipped
nose.selector: INFO: /home/travis/build/neverendingqs/pyiterable/readme.md is executable; skipped
nose.selector: INFO: /home/travis/build/neverendingqs/pyiterable/setup.cfg is executable; skipped
nose.selector: INFO: /home/travis/build/neverendingqs/pyiterable/tox.ini is executable; skipped
nose.selector: INFO: /home/travis/build/neverendingqs/pyiterable/tests/test_iterable.py is executable; skipped
我变了tox.ini
to run nosetests
with --exe
(nosetests --exe --with-coverage --cover-package=pyiterable
), 基于使用 Nose 运行目录中的所有测试 https://stackoverflow.com/questions/6333495/run-all-tests-in-directory-using-nose。修复了一些不相关的错误后,我能够让测试运行@https://travis-ci.org/neverendingqs/pyiterable/builds/79049983 https://travis-ci.org/neverendingqs/pyiterable/builds/79049983!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)