[Python] How can i raising error while python coverage test on azure devops pipeline?

Discussão em 'Python' iniciado por Stack, Setembro 5, 2025.

  1. Stack

    Stack Membro Participativo

    My test code have some fails.

    but pipeline is ignore error and run successful.

    [​IMG]

    How can i raise error?

    azure-pipelines.yml

    ...
    - script: |
    pipenv run coverage run --rcfile=coverage_config --source='.' manage.py test --keepdb
    pipenv run coverage xml
    displayName: 'Run tests'
    env:
    AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
    AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
    FLANB_DEBUG: 'True'

    - task: PublishCodeCoverageResults@1
    inputs:
    codeCoverageTool: Cobertura
    summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
    reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'

    ...

    Continue reading...

Compartilhe esta Página