Files
cleveragents-core/robot/coverage_threshold.robot

28 lines
1015 B
Plaintext

*** Settings ***
Documentation Coverage threshold enforcement tests
Library Process
Library OperatingSystem
*** Variables ***
${PYTHON} python
*** Test Cases ***
Nox Coverage Session Is Listed
[Documentation] Verify coverage_report is a registered nox session
[Tags] slow
${result}= Run Process nox --list timeout=30s
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} coverage_report
Coverage Config Exists In Pyproject
[Documentation] Verify pyproject.toml has coverage configuration
${content}= Get File ${CURDIR}/../pyproject.toml
Should Contain ${content} [tool.coverage.run]
Should Contain ${content} source
Should Contain ${content} branch = true
Coverage Threshold Is 97 In Noxfile
[Documentation] Verify noxfile enforces 97% threshold
${content}= Get File ${CURDIR}/../noxfile.py
Should Contain ${content} --fail-under=97