From dd8b48d98a18678b970975e0f9cb828db55039a3 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Fri, 29 Apr 2022 23:06:40 +0100 Subject: [PATCH] Revert "Update pre-commit.ps1" This reverts commit 35371c9090bee69162463b14d276e1b831f098f1. --- tests/pre-commit.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/pre-commit.ps1 b/tests/pre-commit.ps1 index 7a8e79f..deb12b0 100644 --- a/tests/pre-commit.ps1 +++ b/tests/pre-commit.ps1 @@ -3,12 +3,12 @@ Function RunTests { $run_tests = "pytest -v --capture=tee-sys --junitxml=./tests/.coverage.xml" $match_pattern = "^=|^\s*$|^Running|^Using|^plugins|^collecting|^tests" - if ( Test-Path "./$coverage" ) { Clear-Content $coverage } + Clear-Content $coverage ForEach ($line in $(Invoke-Expression $run_tests)) { If ( $line -Match $match_pattern ) { if ( $line -Match "^Running tests for kind \[(\w+)\]" ) { $kind = $Matches[1] } - $line | Tee-Object -FilePath $coverage -Append + $line | Tee-Object -FilePath $coverage -Append } } Write-Output "$(Get-TimeStamp)" | Out-file $coverage -Append @@ -17,9 +17,9 @@ Function RunTests { } Function Get-TimeStamp { - + return "[{0:MM/dd/yy} {0:HH:mm:ss}]" -f (Get-Date) - + } if ($MyInvocation.InvocationName -ne ".") {