File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 33# PowerShell script to run pytest with coverage.
44# This script can be run from any working directory.
55
6+ Set-StrictMode - Version Latest
67$ErrorActionPreference = " Stop"
78
9+ # Set UTF-8 encoding for console output to properly display Unicode characters
10+ [Console ]::OutputEncoding = [System.Text.Encoding ]::UTF8
11+
812$ScriptDir = $PSScriptRoot
913$RepoRoot = (Resolve-Path (Join-Path $ScriptDir " ..\.." ))
1014
15+ # Set Python to use UTF-8 and unbuffered output
16+ $env: PYTHONIOENCODING = " utf-8"
17+ $env: PYTHONUNBUFFERED = " 1"
18+
1119Push-Location $RepoRoot
1220try {
1321 $env: COVERAGE_FILE = (Join-Path $RepoRoot " tests/python/.coverage" )
14- pytest - v -- cov= shared/ python -- cov- config= tests/ python/ .coveragerc -- cov- report= html:tests/ python/ htmlcov tests/ python/
22+ pytest - v -- color = yes -- cov= shared/ python -- cov- config= tests/ python/ .coveragerc -- cov- report= html:tests/ python/ htmlcov tests/ python/
1523}
1624finally {
1725 Pop-Location
You can’t perform that action at this time.
0 commit comments