updated test

This commit is contained in:
Aparna Jyothi 2025-06-20 18:33:14 +05:30
parent 99c37bc0b2
commit 512e05768d
2 changed files with 0 additions and 106 deletions

View file

@ -94,52 +94,3 @@ jobs:
run: |
curl -L https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | jq empty
shell: bash
verify-install-path:
name: Verify Install Path
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-11-arm]
architecture: [x86, arm64]
python-version: ['3.11', '3.12', '3.13.1', '3.14.0-beta.2']
freethreaded: ['false']
include:
- os: windows-11-arm
architecture: x86
python-version: '3.13.1'
freethreaded: true
- os: windows-11-arm
architecture: arm64
python-version: '3.13.1'
freethreaded: true
- os: windows-11-arm
architecture: x86
python-version: '3.14.0-beta.2'
freethreaded: true
- os: windows-11-arm
architecture: arm64
python-version: '3.14.0-beta.2'
freethreaded: true
- os: windows-latest
architecture: x86
python-version: '3.10'
freethreaded: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
freethreaded: ${{ matrix.freethreaded }}
- name: Verify Install Path
shell: pwsh
run: python __tests__/verify_windows_install_path_user.py `
${{ matrix.python-version }} `
${{ matrix.architecture }} `
${{ matrix.freethreaded }}

View file

@ -1,57 +0,0 @@
import os
import sys
import re
def build_expected_path(python_version, architecture, freethreaded):
print("Inputs received:")
print(f" Python Version : {python_version}")
print(f" Architecture : {architecture}")
print(f" Freethreaded : {freethreaded}")
# Extract major and minor from version like "3.13.1" or "3.14.0-beta.2"
match = re.match(r"^(\d+)\.(\d+)", python_version)
if not match:
print(f"Invalid python version format: {python_version}")
sys.exit(1)
major, minor = match.groups()
version_suffix = f"{major}{minor}"
if freethreaded == "true":
version_suffix += "t"
if architecture == "x86":
version_suffix += "-32"
elif architecture == "arm64":
version_suffix += "-arm64"
else:
if architecture == "x86":
version_suffix += "-32"
elif architecture == "arm64":
version_suffix += "-arm64"
base_path = os.getenv("APPDATA", "")
full_path = os.path.join(base_path, "Python", f"Python{version_suffix}", "Scripts")
print(f"Constructed expected path: {full_path}")
return full_path
def main():
if len(sys.argv) != 4:
print("Usage: python verify_windows_install_path.py <python_version> <architecture> <freethreaded>")
sys.exit(1)
python_version = sys.argv[1]
architecture = sys.argv[2]
freethreaded = sys.argv[3]
expected_path = build_expected_path(python_version, architecture, freethreaded)
print("Validating against PATH environment variable...")
path_env = os.getenv("PATH", "")
if expected_path.lower() in path_env.lower():
print("Correct path present in PATH")
else:
print("Expected path not found in PATH")
sys.exit(1)
if __name__ == "__main__":
main()