| 1 | From 39ea25ff598cfd52e0cac37525a44dbf6590b800 Mon Sep 17 00:00:00 2001
|
| 2 | From: Travis Hathaway <[email protected]>
|
| 3 | Date: Mon, 29 Sep 2025 15:22:44 +0200
|
| 4 | SPDX-License-Identifier: BSD-3-Clause
|
| 5 | Subject: [PATCH 1/2] removing this test because it we are adding a setting to
|
| 6 | conda-libmamba-solver
|
| 7 |
|
| 8 | ---
|
| 9 | tests/plugins/test_settings.py | 17 -----------------
|
| 10 | 1 file changed, 17 deletions(-)
|
| 11 |
|
| 12 | diff --git a/tests/plugins/test_settings.py b/tests/plugins/test_settings.py
|
| 13 | index 05196c5c09b..27b9fcf70c1 100644
|
| 14 | |
| 15 | |
| 16 | @@ -326,23 +326,6 @@ def test_conda_config_describe_includes_plugin_settings(
|
| 17 | assert f"plugins.{MAP_PARAMETER_NAME}:" in out
|
| 18 |
|
| 19 |
|
| 20 | -def test_conda_config_describe_not_included_without_plugins(conda_cli):
|
| 21 | - """
|
| 22 | - Ensure that the describe command does not include the section banner
|
| 23 | - for plugins when no additional settings are provided by plugins
|
| 24 | - """
|
| 25 | - out, err, _ = conda_cli("config", "--describe")
|
| 26 | -
|
| 27 | - section_banner = (
|
| 28 | - "# ######################################################\n"
|
| 29 | - "# ## Additional settings provided by plugins ##\n"
|
| 30 | - "# ######################################################"
|
| 31 | - )
|
| 32 | -
|
| 33 | - assert not err
|
| 34 | - assert section_banner not in out
|
| 35 | -
|
| 36 | -
|
| 37 | def test_conda_config_describe_unknown_plugin_setting(
|
| 38 | condarc_plugin_manager, conda_cli
|
| 39 | ):
|
| 40 |
|
| 41 | From 7254151456ad201bfc1ead8ab48a509c4e9a7319 Mon Sep 17 00:00:00 2001
|
| 42 | From: Travis Hathaway <[email protected]>
|
| 43 | Date: Mon, 29 Sep 2025 17:09:01 +0200
|
| 44 | Subject: [PATCH 2/2] using a mock to fix test instead of removing it
|
| 45 |
|
| 46 | ---
|
| 47 | tests/plugins/test_settings.py | 19 +++++++++++++++++++
|
| 48 | 1 file changed, 19 insertions(+)
|
| 49 |
|
| 50 | diff --git a/tests/plugins/test_settings.py b/tests/plugins/test_settings.py
|
| 51 | index 27b9fcf70c1..eb5200eb105 100644
|
| 52 | |
| 53 | |
| 54 | @@ -326,6 +326,25 @@ def test_conda_config_describe_includes_plugin_settings(
|
| 55 | assert f"plugins.{MAP_PARAMETER_NAME}:" in out
|
| 56 |
|
| 57 |
|
| 58 | +def test_conda_config_describe_not_included_without_plugins(conda_cli, mocker):
|
| 59 | + """
|
| 60 | + Ensure that the describe command does not include the section banner
|
| 61 | + for plugins when no additional settings are provided by plugins
|
| 62 | + """
|
| 63 | + mock = mocker.patch("conda.plugins.manager.CondaPluginManager.get_hook_results")
|
| 64 | + mock.return_value = []
|
| 65 | + out, err, _ = conda_cli("config", "--describe")
|
| 66 | +
|
| 67 | + section_banner = (
|
| 68 | + "# ######################################################\n"
|
| 69 | + "# ## Additional settings provided by plugins ##\n"
|
| 70 | + "# ######################################################"
|
| 71 | + )
|
| 72 | +
|
| 73 | + assert not err
|
| 74 | + assert section_banner not in out
|
| 75 | +
|
| 76 | +
|
| 77 | def test_conda_config_describe_unknown_plugin_setting(
|
| 78 | condarc_plugin_manager, conda_cli
|
| 79 | ):
|