Трэвис собирает ... Команда "Пыст" вышла с 1 - PullRequest
0 голосов
/ 18 октября 2019

Для проекта https://github.com/WolfgangFahl/play-chess-with-a-webcam и конфигурации travis:

# see https://docs.travis-ci.com/user/languages/python/
language: python
# python versions to be tested
python:
#  - "2.7" # see https://github.com/WolfgangFahl/gremlin-python-tutorial/issues/7
  - "3.7"
# command to install dependencies
install:
  - pip install -r requirements.txt
# command to run tests
script:
  - pytest

Я получаю сообщение об ошибке:

collecting ... The command "pytest" exited with 1.

в среде travis. В то время как локально я получаю:

============================== test session starts ==============================
platform darwin -- Python 3.7.4, pytest-5.2.1, py-1.8.0, pluggy-0.12.0
rootdir: /Users/wf/source/python/play-chess-with-a-webcam
collected 5 items                                                               

test_OpenCV_version.py .                                                  [ 20%]
test_Video.py ..                                                          [ 60%]
test_findBoard.py ..                                                      [100%]

=============================== 5 passed in 7.03s ===============================

В чем причина ошибки?

Как я могу это исправить?

1 Ответ

0 голосов
/ 18 октября 2019

В чем причина ошибки? В тестах есть выход OpenCV GUI и ситуация без головы, давайте запустим Pytest.

Как я могу это исправить? добавитьследующее к .travis.yml

# allow gui output
services:
  - xvfb
...