小编Pio*_*rus的帖子

PyTest 弃用:'junit_family 默认值将更改为'xunit2'

我在circleci.

留言

/home/circleci/evobench/env/lib/python3.7/site-packages/_pytest/junitxml.py:436: PytestDeprecationWarning: The 'junit_family' default value will change to 'xunit2' in pytest 6.0.
Run Code Online (Sandbox Code Playgroud)

命令

- run:
    name: Tests
    command: |
      . env/bin/activate
      mkdir test-reports
      python -m pytest --junitxml=test-reports/junit.xml
Run Code Online (Sandbox Code Playgroud)

我应该如何修改命令以使用 xunit?是否可以使用默认工具,如消息中所述?我的意思是不指定 xunit 或 junit。

这是完整的管道

python pytest circleci

10
推荐指数
1
解决办法
4257
查看次数

Azure Pipelines - 使用 Poetry 的正确方法

为 Azure Pipelines安装 Python 包依赖项的推荐方法是什么poetry?我发现人们只poetry通过这种方式下载pip,这是一个很大的禁忌。

- script: |
    python -m pip install -U pip
    pip install poetry
    poetry install
  displayName: Install dependencies
Run Code Online (Sandbox Code Playgroud)

我可以使用curl来下载poetry

  - script: |
      curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
      export PATH=$PATH:$HOME/.poetry/bin
      poetry install --no-root
    displayName: 'Install dependencies'
Run Code Online (Sandbox Code Playgroud)

但在接下来的每一步中我都必须PATH再次添加诗歌......

  - script: |
      curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
      export PATH=$PATH:$HOME/.poetry/bin
      poetry install --no-root
    displayName: 'Install dependencies'

  - script: |
      # export PATH=$PATH:$HOME/.poetry/bin
      poetry run flake8 src
    displayName: 'Linter' …
Run Code Online (Sandbox Code Playgroud)

python continuous-integration azure azure-devops azure-pipelines

4
推荐指数
1
解决办法
7118
查看次数