mirror of
https://github.com/actions/python-versions.git
synced 2025-12-13 22:17:32 +00:00
Update python-tests.ps1
This commit is contained in:
@@ -18,16 +18,22 @@ BeforeAll {
|
|||||||
$pattern = "$searchStringStart(.*?)$searchStringEnd"
|
$pattern = "$searchStringStart(.*?)$searchStringEnd"
|
||||||
|
|
||||||
$buildContent = Get-Content -Path $buildOutputLocation
|
$buildContent = Get-Content -Path $buildOutputLocation
|
||||||
$splitBuiltOutput = $buildContent -split "\n";
|
$splitBuiltOutput = $buildContent -split "\n"
|
||||||
|
|
||||||
### Search for missing modules that are displayed between the search strings
|
### Search for missing modules that are displayed between the search strings
|
||||||
$regexMatch = [regex]::match($SplitBuiltOutput, $Pattern)
|
$regexMatch = [regex]::match($splitBuiltOutput, $pattern)
|
||||||
if ($regexMatch.Success)
|
if ($regexMatch.Success) {
|
||||||
{
|
|
||||||
$module = $regexMatch.Groups[1].Value.Trim()
|
$module = $regexMatch.Groups[1].Value.Trim()
|
||||||
Write-Host "Failed missing modules:"
|
Write-Host "Failed missing modules:"
|
||||||
Write-Host $module
|
Write-Host $module
|
||||||
if ( ($module -eq "_tkinter") -and ( [semver]"$($Version.Major).$($Version.Minor)" -ge [semver]"3.10" -and $Version.PreReleaseLabel ) ) {
|
try {
|
||||||
|
$semver = [semver]"$($Version.Major).$($Version.Minor)"
|
||||||
|
} catch {
|
||||||
|
Write-Error "Invalid Semantic Version format: $Version"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($module -eq "_tkinter") -and ($semver -ge [semver]"3.10") -and $Version.PreReleaseLabel) {
|
||||||
Write-Host "$module $Version ignored"
|
Write-Host "$module $Version ignored"
|
||||||
} else {
|
} else {
|
||||||
return 1
|
return 1
|
||||||
@@ -54,7 +60,7 @@ Describe "Tests" {
|
|||||||
# linux has no display name and no $DISPLAY environment variable - skip tk test
|
# linux has no display name and no $DISPLAY environment variable - skip tk test
|
||||||
# if (-not (($Platform -match "ubuntu") -or ($Platform -match "linux"))) {
|
# if (-not (($Platform -match "ubuntu") -or ($Platform -match "linux"))) {
|
||||||
# It "Check if tcl/tk has the same headed and library versions" {
|
# It "Check if tcl/tk has the same headed and library versions" {
|
||||||
# "python ./sources/tcltk.py" | Should -ReturnZeroExitCode
|
# "python ./sources/tcltk.py" | Should -ReturnZeroExitCode
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user