【问题标题】:How to test a project with multiple python versions in a sequential way?如何以顺序方式测试具有多个 python 版本的项目?
【发布时间】:2014-10-12 19:40:15
【问题描述】:

我正在开发一个 python 适配器来与第三方网站交互,没有任何 json 或 xml api (http://www.class.noaa.gov/)。

当 Travis CI 同时运行多个 Python 测试(The Travis CI Build Matrix)时,我遇到了问题。

该项目在 GitHub 上的 ecolell/noaaclass 和 .travis.yml 文件是:

language: python
python:
  - "2.6"
  - "2.7"
  - "3.2"
  - "3.3"
install:
  - "make deploy"
script: "make test-coverage-travis-ci" #nosetests
after_success:
  - "make test-coveralls"

具体来说,当至少 2 个 python 版本同时运行它们的单元测试时,我遇到了一个问题,因为它们使用同一个网站帐户。

是否有任何选项可以指定 The Build Matrix 以一种连续的方式执行每个 python 版本?

或者,有没有更好的方法来做到这一点?

【问题讨论】:

    标签: python unit-testing travis-ci sequential noaa


    【解决方案1】:

    我无法谈论如何解决 Travis CI 问题,但我可能会推荐 using tox 在多个 Python 版本上测试包。

    【讨论】:

    • 谢谢!我也问过here,但你的回答是不错的选择。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多