Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ MigrationBackup/
# pytest-azurepipelines
test-output.xml

# pytest-cov
coverage.xml
htmlcov/

# Other
*.ini
*.json
Expand Down
5 changes: 3 additions & 2 deletions build/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@ function Invoke-Tests() {
[string] $PackageDir,
[string] $EnvName
)
$PkgName = $PackageDir.replace("-", ".")
$ParentPath = Split-Path -parent $PSScriptRoot
$AbsPackageDir = Join-Path $ParentPath $PackageDir
Write-Host "##[info]Test package $AbsPackageDir and run tests for env $EnvName"
# Activate env
Use-CondaEnv $EnvName
# Install testing deps
python -m pip install --upgrade pip
pip install pytest pytest-azurepipelines
pip install pytest pytest-azurepipelines pytest-cov
# Run tests
pytest $AbsPackageDir
pytest --cov-report term --cov=$PkgName $AbsPackageDir
}

if ($Env:ENABLE_PYTHON -eq "false") {
Expand Down