Skip to content

Commit a99cf64

Browse files
authored
fix(pet-conda): shorten test fixture path for Windows compatibility (#384)
Rename the long conda test fixture directory `conda_env_without_manager_but_found_in_history` → `conda_hist` so Windows GitHub Actions checkouts stay under the 260-character path limit. - Renamed fixture directory and all contained files (26 files) - Updated path references in `lib_test.rs` - Updated stale hardcoded paths in the committed `history` file - Passes `cargo fmt --all --check` and `cargo clippy --all -- -D warnings` Fixes #171
1 parent dd11802 commit a99cf64

26 files changed

+5
-13
lines changed

crates/pet-conda/tests/lib_test.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,9 @@ fn find_conda_env_without_manager_but_detect_manager_from_history() {
5151

5252
let environment = create_test_environment(HashMap::new(), None, vec![], None);
5353
let locator = Conda::from(&environment);
54-
let path = resolve_test_path(&[
55-
"unix",
56-
"conda_env_without_manager_but_found_in_history",
57-
"env_python_3",
58-
]);
59-
let conda_dir = resolve_test_path(&[
60-
"unix",
61-
"conda_env_without_manager_but_found_in_history",
62-
"some_other_location",
63-
"conda_install",
64-
]);
54+
let path = resolve_test_path(&["unix", "conda_hist", "env_python_3"]);
55+
let conda_dir =
56+
resolve_test_path(&["unix", "conda_hist", "some_other_location", "conda_install"]);
6557
let history_file = path.join("conda-meta").join("history");
6658
let history_file_template = path.join("conda-meta").join("history_template");
6759
let history_contents = fs::read_to_string(&history_file_template)

crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/env_python_3/bin/conda renamed to crates/pet-conda/tests/unix/conda_hist/env_python_3/bin/conda

File renamed without changes.

crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/env_python_3/bin/python renamed to crates/pet-conda/tests/unix/conda_hist/env_python_3/bin/python

File renamed without changes.

crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/env_python_3/bin/python3 renamed to crates/pet-conda/tests/unix/conda_hist/env_python_3/bin/python3

File renamed without changes.

crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/env_python_3/bin/python3.1 renamed to crates/pet-conda/tests/unix/conda_hist/env_python_3/bin/python3.1

File renamed without changes.

crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/env_python_3/bin/python3.12 renamed to crates/pet-conda/tests/unix/conda_hist/env_python_3/bin/python3.12

File renamed without changes.

crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/env_python_3/conda-meta/history renamed to crates/pet-conda/tests/unix/conda_hist/env_python_3/conda-meta/history

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
==> 2024-02-28 23:05:07 <==
2-
# cmd: /home/runner/work/python-environment-tools/python-environment-tools/crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/some_other_location/conda_install/bin/conda create -n conda1
2+
# cmd: /home/runner/work/python-environment-tools/python-environment-tools/crates/pet-conda/tests/unix/conda_hist/some_other_location/conda_install/bin/conda create -n conda1
33
# conda version: 23.11.0
44
==> 2024-02-28 23:08:59 <==
5-
# cmd: /home/runner/work/python-environment-tools/python-environment-tools/crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/some_other_location/conda_install/bin/conda install -c conda-forge --name conda1 ipykernel -y
5+
# cmd: /home/runner/work/python-environment-tools/python-environment-tools/crates/pet-conda/tests/unix/conda_hist/some_other_location/conda_install/bin/conda install -c conda-forge --name conda1 ipykernel -y
66
# conda version: 23.11.0
77
+conda-forge/noarch::appnope-0.1.4-pyhd8ed1ab_0
88
+conda-forge/noarch::asttokens-2.4.1-pyhd8ed1ab_0

crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/env_python_3/conda-meta/history_template renamed to crates/pet-conda/tests/unix/conda_hist/env_python_3/conda-meta/history_template

File renamed without changes.

crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/env_python_3/conda-meta/pygments-2.17.2-pyhd8ed1ab_0.json renamed to crates/pet-conda/tests/unix/conda_hist/env_python_3/conda-meta/pygments-2.17.2-pyhd8ed1ab_0.json

File renamed without changes.

crates/pet-conda/tests/unix/conda_env_without_manager_but_found_in_history/env_python_3/conda-meta/python-3.12.2-hdf0ec26_0_cpython.json renamed to crates/pet-conda/tests/unix/conda_hist/env_python_3/conda-meta/python-3.12.2-hdf0ec26_0_cpython.json

File renamed without changes.

0 commit comments

Comments
 (0)