From a670e01c229cd71529a7313f1d5b96ae3e0cd69d Mon Sep 17 00:00:00 2001 From: Matan Kushner Date: Thu, 21 May 2020 13:13:51 -0400 Subject: [PATCH] ci: upgrade Python for integration tests (#1243) --- .github/workflows/workflow.yml | 2 +- tests/testsuite/python.rs | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index dfc17edb..4c3f7bb6 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -119,7 +119,7 @@ jobs: # Install Python at a fixed version - uses: actions/setup-python@v1 with: - python-version: "3.8.2" + python-version: "3.7.7" # Install dotnet at a fixed version - uses: actions/setup-dotnet@v1 diff --git a/tests/testsuite/python.rs b/tests/testsuite/python.rs index 2bfd7d30..9c1d1a8d 100644 --- a/tests/testsuite/python.rs +++ b/tests/testsuite/python.rs @@ -32,7 +32,7 @@ fn folder_with_python_version() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7")); assert_eq!(expected, actual); dir.close() } @@ -49,7 +49,7 @@ fn folder_with_requirements_txt() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7")); assert_eq!(expected, actual); dir.close() } @@ -66,7 +66,7 @@ fn folder_with_pyproject_toml() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7")); assert_eq!(expected, actual); dir.close() } @@ -83,7 +83,7 @@ fn folder_with_pipfile() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7")); assert_eq!(expected, actual); dir.close() } @@ -100,7 +100,7 @@ fn folder_with_tox() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7")); assert_eq!(expected, actual); dir.close() } @@ -117,7 +117,7 @@ fn folder_with_setup_py() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7")); assert_eq!(expected, actual); Ok(()) } @@ -134,7 +134,7 @@ fn folder_with_init_py() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7")); assert_eq!(expected, actual); Ok(()) } @@ -151,7 +151,7 @@ fn folder_with_py_file() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7")); assert_eq!(expected, actual); dir.close() } @@ -168,7 +168,7 @@ fn with_virtual_env() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2 (my_venv)")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7 (my_venv)")); assert_eq!(expected, actual); dir.close() } @@ -185,7 +185,7 @@ fn with_active_venv() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2 (my_venv)")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7 (my_venv)")); assert_eq!(expected, actual); dir.close() } @@ -226,7 +226,7 @@ fn disabled_scan_for_pyfiles_and_folder_with_setup_py() -> io::Result<()> { .output()?; let actual = String::from_utf8(output.stdout).unwrap(); - let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.8.2")); + let expected = format!("via {} ", Color::Yellow.bold().paint("🐍 v3.7.7")); assert_eq!(expected, actual); Ok(()) }