From c99a2771069409740d9bf714d1f1172cd81716dc Mon Sep 17 00:00:00 2001 From: junkmd Date: Sun, 8 Oct 2023 13:47:29 +0900 Subject: [PATCH] update more --- ci/runTestsuite.ps1 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ci/runTestsuite.ps1 b/ci/runTestsuite.ps1 index 11961cdbf..821156fc7 100644 --- a/ci/runTestsuite.ps1 +++ b/ci/runTestsuite.ps1 @@ -43,13 +43,14 @@ function run { #nosetests --all-modules --with-xunit pywinauto/unittests # --traverse-namespace is required for python 3.8 https://stackoverflow.com/q/58556183 - $pyver = $env:PYTHON_VERSION - if ($pyver -lt [version]'3.9') { - Write-Host "run nosetests" - nosetests --nologcapture --traverse-namespace --exclude=testall --with-xunit --with-coverage --cover-html --cover-html-dir=Coverage_report --cover-package=pywinauto --verbosity=3 pywinauto\unittests - } else { + $pyver = [System.Version]::new($env:PYTHON_VERSION) + if if ($pyver.Major -gt 3 -or ($pyver.Major -eq 3 -and $pyver.Minor -ge 9)) { Write-Host "run nose2" nose2 --nologcapture --exclude=testall --with-xunit --with-coverage --cover-html --cover-html-dir=Coverage_report --cover-package=pywinauto --verbosity=3 pywinauto\unittests + + } else { + Write-Host "run nosetests" + nosetests --nologcapture --traverse-namespace --exclude=testall --with-xunit --with-coverage --cover-html --cover-html-dir=Coverage_report --cover-package=pywinauto --verbosity=3 pywinauto\unittests } $success = $? Write-Host "result code of nosetests:" $success