Files
runner-images/images/macos/tests/Python.Tests.ps1
Leonid Lapshin 2e06b1a227 Removed PyPy version workaround for macOS 10.13 (#2414)
* removed pypy version workaround for macOS 10.13

* fix toolcache test on macos

* fixed an error

* disable strict name checking for imported powershell modules

* Ruby 3.0 doesn't exists on 10.13

Co-authored-by: Leonid Lapshin <originalnoe-nazvanie@yandex.ru>
2021-01-14 12:17:44 +03:00

44 lines
1.3 KiB
PowerShell

Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking
$os = Get-OSVersion
Describe "Python" {
It "Python 2 is available" {
"python --version" | Should -ReturnZeroExitCode
}
It "Python 2 is real 2.x" {
(Get-CommandResult "python --version").Output | Should -BeLike "Python 2.*"
}
It "Python 2 is installed under /usr/local/bin" {
Get-WhichTool "python" | Should -BeLike "/usr/local/bin*"
}
It "Python 3 is available" {
"python3 --version" | Should -ReturnZeroExitCode
}
It "Python 3 is installed under /usr/local/bin" {
Get-WhichTool "python3" | Should -BeLike "/usr/local/bin*"
}
It "Pip 2 is available" {
"pip --version" | Should -ReturnZeroExitCode
}
It "Pip 3 is available" {
"pip3 --version" | Should -ReturnZeroExitCode
}
It "Pipx is available" {
"pipx --version" | Should -ReturnZeroExitCode
}
It "Pip 3 and Python 3 came from the same brew formula" {
$pip3Path = Split-Path (readlink (which pip3))
$python3Path = Split-Path (readlink (which python3))
$pip3Path | Should -BeExactly $python3Path
}
}