@echo off setlocal cd /d "%~dp0.." set "PYTHON=D:\_Programs\anaconda\envs\sites\python.exe" if not exist "%PYTHON%" ( echo Python not found: %PYTHON% pause exit /b 1 ) if "%~1"=="" ( "%PYTHON%" -m pytest "%~dp0." --cov=src --cov-branch --cov-report=term-missing --cov-report=xml ) else ( "%PYTHON%" -m pytest %* ) set "EXIT_CODE=%ERRORLEVEL%" pause exit /b %EXIT_CODE%