From 8b9722fe0fbb0f45259040e3e132377ad9c2a379 Mon Sep 17 00:00:00 2001 From: nsheff Date: Wed, 5 Nov 2025 17:43:11 -0500 Subject: [PATCH] update to newest yacman --- tests/divvytests/divvy_tests/test_divvy.py | 10 +++++----- tests/divvytests/test_divvy_simple.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/divvytests/divvy_tests/test_divvy.py b/tests/divvytests/divvy_tests/test_divvy.py index a67e489d..3a3a6fe9 100644 --- a/tests/divvytests/divvy_tests/test_divvy.py +++ b/tests/divvytests/divvy_tests/test_divvy.py @@ -1,7 +1,7 @@ """Assorted divvy tests""" import pytest -from yacman import YacAttMap, load_yaml +from yacman import YAMLConfigManager, load_yaml from looper.divvy import DEFAULT_COMPUTE_RESOURCES_NAME from tests.divvytests.conftest import DCC_ATTRIBUTES, FILES, mock_env_missing @@ -60,9 +60,9 @@ class TestGettingActivePackage: """Test for the get_active_package method""" def test_settings_nonempty(self, dcc): - """Test if get_active_package produces a nonempty YacAttMap object""" + """Test if get_active_package produces a nonempty YAMLConfigManager object""" settings = dcc.get_active_package() - assert settings != YacAttMap() + assert settings != YAMLConfigManager() class TestListingPackages: @@ -87,7 +87,7 @@ def test_reset_active_settings(self, dcc): def test_reset_active_settings_works(self, dcc): """Test if the settings are cleared""" dcc.reset_active_settings() - assert dcc.get_active_package() == YacAttMap({}) + assert dcc.get_active_package() == YAMLConfigManager({}) class UpdatingPackagesTests: @@ -98,4 +98,4 @@ def test_update_packages(self, dcc, config_file): """Test updating does not produce empty compute packages""" entries = load_yaml(config_file) dcc.update(entries) - assert dcc["compute_packages"] != YacAttMap() + assert dcc["compute_packages"] != YAMLConfigManager() diff --git a/tests/divvytests/test_divvy_simple.py b/tests/divvytests/test_divvy_simple.py index 5770661f..bbdc1e44 100644 --- a/tests/divvytests/test_divvy_simple.py +++ b/tests/divvytests/test_divvy_simple.py @@ -3,7 +3,7 @@ import pytest from collections import OrderedDict -from yacman import YacAttMap +from yacman import YAMLConfigManager from looper.divvy import select_divvy_config # For interactive debugging: @@ -49,7 +49,7 @@ def test_write_script(self): # "compute", # [ # dict({"mem": 1000, "test": 0}), -# YacAttMap({"mem": 1000, "test": 0}), +# YAMLConfigManager({"mem": 1000, "test": 0}), # OrderedDict({"mem": 1000, "test": 0}), # ], # ) @@ -68,7 +68,7 @@ def test_write_script(self): # def test_adapters_overwitten_by_others(self): # dcc = divvy.ComputingConfiguration() # dcc.activate_package("singularity_slurm") -# compute = YacAttMap({"mem": 1000}) +# compute = YAMLConfigManager({"mem": 1000}) # extra_vars = [{"compute": compute}, {"MEM": 333}] # dcc.write_script("test1.sub", extra_vars) # with open("test1.sub", "r") as f: