Windows中的Python测试在Appveyor上失败

时间:2018-12-27 21:31:15

标签: python appveyor

我正在尝试实现传送带CI,并且test_script似乎运行正常,然后发生ValueError并且构建失败。上一个版本(Ubuntu)没有问题,只有Windows使用Python 3.63.7进行构建。但是Python 3.5通过了,请参阅下面的编辑以了解该构建的输出。

我应该提到我无法在本地Windows计算机上重新创建此问题。

----------------------------------------------------------------------
Ran 51 tests in 0.141s
OK
Exception ignored in: <_io.TextIOWrapper mode='w' encoding='cp1252'>
ValueError: underlying buffer has been detached
Command exited with code 120

appveyor.yml:

version: '1.0.{build}'

environment:

  matrix:
    # Windows w/64 bit Geo & python 3.6
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      PYTHON: "C:\\Python36-x64"
      PYTHON_ARCH: "64"

    # Windows w/32 bit Geo & python 3.6
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      PYTHON: "C:\\Python36"
      PYTHON_ARCH: "32"

    # Ubuntu - python 3
    - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
      PYTHON: "3.6"


init:
  - cmd: set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
  - cmd: "%PYTHON%/python -V"
  - cmd: "%PYTHON%/python -c \"import struct;print(8 * struct.calcsize(\'P\'))\""

stack: python %PYTHON%

build_script:
  - ps: .\appveyor\build.ps1

test_script:
  - python setup.py test

编辑:

奇怪的是,如果我在Windows上切换到python 3.5,则会收到相同的错误,但构建完成:

----------------------------------------------------------------------
Ran 51 tests in 1.796s
OK
Exception ignored in: <_io.TextIOWrapper mode='w' encoding='cp1252'>
ValueError: underlying buffer has been detached
Build success

0 个答案:

没有答案