我目前有一个具有以下.travis.yml文件的项目:
I currently have a project with the following .travis.yml file:
language: python install: "pip install tox" script: "tox"在本地,tox正确执行并运行35个测试,但是在Travis CI上,它运行 0个测试.
Locally, tox properly executes and runs 35 tests, but on Travis CI, it runs 0 tests.
更多详细信息: travis-ci/neverendingqs/pyiterable/builds/78954867
我还尝试了其他方法,包括:
I also tried other ways, including:
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"他们也找不到任何测试.
我的项目结构为像这样:
- ... - <module> - tests (for the module) - ...项目/文件夹的结构是否正确?
Are the project/folders structured incorrectly?
推荐答案文件夹结构没有问题.
Travis CI上的文件似乎被认为是可执行文件(来自 travis-ci/neverendingqs/pyiterable/builds/79049179 ):
It looks like the files on Travis CI are considered executable (logs from travis-ci/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我根据使用鼻子"在目录中运行所有测试.修复了一些不相关的错误之后,我能够使测试运行@ travis-ci/neverendingqs/pyiterable/builds/79049983 !
I changed tox.ini to run nosetests with --exe (nosetests --exe --with-coverage --cover-package=pyiterable), based on Run all Tests in Directory Using Nose. After fixing some non-related errors, I was able to get the tests to run @ travis-ci/neverendingqs/pyiterable/builds/79049983!
更多推荐
Travis CI查找和运行测试的Python项目结构应该是什么样的?
发布评论